Skip to content

Instantly share code, notes, and snippets.

@jwmickey
Created August 2, 2019 18:35
Show Gist options
  • Save jwmickey/ae5342c4fa27d5a61c4464bbc949a481 to your computer and use it in GitHub Desktop.
Save jwmickey/ae5342c4fa27d5a61c4464bbc949a481 to your computer and use it in GitHub Desktop.
[Docker] Copy data from host to existing volume
# 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