To copy a file from an image, create a temporary container, copy the file from it and then delete it:
id=$(docker create image-name)
docker cp $id:path - > local-tar-file
docker rm -v $id
More Related Contents:
- Docker: How to clear the logs properly for a Docker container?
- How can I use a local file on container?
- Port forwarding in docker-machine?
- Not enough entropy to support /dev/random in docker containers running in boot2docker
- Connect to a Service running inside a docker container from outside
- What’s the best way to share files from Windows to Boot2docker VM?
- How to copy files from host to Docker container?
- Why docker container exits immediately
- Use of Supervisor in docker
- Docker Compose – Share named volume between multiple containers
- In a Dockerfile, How to update PATH environment variable?
- How to remove old Docker containers
- How to keep Docker container running after starting services?
- How to show the run command of a docker container
- How to make sure docker’s time syncs with that of the host?
- Docker remove TAG images
- what is docker run -it flag?
- Cannot login to Docker account
- Linux machine with docker deploy windows container
- In Docker, what’s the difference between a container and an image? [duplicate]
- docker data volume vs mounted host directory
- Is there a best practice on setting up glibc on docker alpine linux base image?
- How to get ENV variable when doing Docker Inspect
- How to pass ARG value to ENTRYPOINT?
- Multiple commands on docker ENTRYPOINT
- How can I use environment variables in docker-compose?
- Add Insecure Registry to Docker
- How to get remote access to a private docker-registry?
- How to tag docker image with docker-compose
- Docker loading kernel modules