Skip to content

Instantly share code, notes, and snippets.

@angelortiz-dev
Created September 2, 2015 17:25
Show Gist options
  • Select an option

  • Save angelortiz-dev/6ed313a8114ddb6b279d to your computer and use it in GitHub Desktop.

Select an option

Save angelortiz-dev/6ed313a8114ddb6b279d to your computer and use it in GitHub Desktop.
Useful commands for docker
# copy file from host to a container
cat /local/file/path | docker exec -i <running-container-id> sh -c 'cat > /inside/docker/file/path'
# copy file from a container to host
docker cp <containerId>:/file/path/within/container /host/path/target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment