Created
September 4, 2015 12:36
-
-
Save srenatus/f57a476fe5b3d0c96427 to your computer and use it in GitHub Desktop.
start a container from a container, with volumes.
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
docker@boot2docker:~$ pwd | |
/home/docker | |
docker@boot2docker:~$ docker run -it -v $(pwd)/foo:/foo -v /var/run/docker.sock:/var/run/docker.sock sse/jenkins bash | |
jenkins@ccfdbe3ccaac:/$ ls /foo/ | |
bar foofoo | |
jenkins@ccfdbe3ccaac:/$ docker run -it -v /home/docker/foo/bar:/bar debian:jessie bash # <-- /!\ | |
root@be6343378d9a:/# ls /bar | |
baz | |
root@be6343378d9a:/# date > /bar/bar | |
root@be6343378d9a:/# exit | |
jenkins@ccfdbe3ccaac:/$ cat /foo/bar/bar | |
Fri Sep 4 12:33:17 UTC 2015 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment