Answers for "copy a file from docker image"

10

copy files from a docker container to the host machine using cmd

docker cp <containerId>:/file/path/within/container /host/path/target
Posted by: Guest on June-23-2020
1

docker extract file from image

docker cp $(docker create registry.example.com/ansible-base:latest):/home/ansible/.ssh/id_rsa ./hacked_ssh_key
Posted by: Guest on August-17-2020

Browse Popular Code Answers by Language