Created
August 2, 2019 18:35
-
-
Save jwmickey/ae5342c4fa27d5a61c4464bbc949a481 to your computer and use it in GitHub Desktop.
[Docker] Copy data from host to existing volume
This file contains 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
# mount on a specific volume | |
docker run -v my-jenkins-volume:/data --name helper busybox true | |
docker cp . helper:/data | |
docker rm helper | |
# alternatively, mount on volumes from another container | |
docker run --volumes-from my_other_container --name helper busybox true | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment