fabelx
fabelx

Reputation: 405

What folders do I need to mount to share docker images?

I have a Dind image (docker in docker). I want to share images between containers that are loaded inside containers. How to do it? What folders should I mount?

Thanks.

Upvotes: 0

Views: 73

Answers (1)

David Maze
David Maze

Reputation: 159697

The Docker image storage format is complex and installation-specific. If you have two installations of Docker, they can't share images, even if they're running on the same physical system.

That means you need to use one of the normal means of transferring images between locations: docker push and docker pull the images via a registry; docker build an image from source where you need it; or use docker save and docker load to create an intermediate tar file. If the DinD container is named dind, in principle you should be able to

docker exec dind docker save some-image | docker load
docker save another-image | docker exec dind docker load

Upvotes: 1

Related Questions