Created
November 26, 2016 21:09
-
-
Save AmitAronovitch/b97f7c3a9586a463a2cedfe42b4aea1d to your computer and use it in GitHub Desktop.
demo: docker containers preserve data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
amit@penguin:~$ docker run -i -t debian /bin/bash | |
root@338b5a0ff034:/# mkdir /usr/local/blabla | |
root@338b5a0ff034:/# echo hello-there >/usr/local/blabla/data | |
root@338b5a0ff034:/# exit | |
exit | |
amit@penguin:~$ docker ps -a | |
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |
338b5a0ff034 debian "/bin/bash" 32 seconds ago Exited (0) 5 seconds ago stoic_goldberg | |
13ffee81f8cd debian "/bin/bash" 35 hours ago Exited (0) 29 hours ago boring_kowalevski | |
amit@penguin:~$ docker start -a -i 338b5a0ff034 | |
root@338b5a0ff034:/# cat /usr/local/blabla/data | |
hello-there | |
root@338b5a0ff034:/# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment