Docker Community Forums

Share and learn in the Docker community.

How to share the images at all the local hosts?

(Dockertiger) #1

i have a huge image,i have to pull this image to all the docker hosts . i want to pull only one image to a docker host,others docker hosts share this image, have any solution for this case ?

(David Maze) #2

Set up a private registry. Then the hosts can all docker pull and each have a copy of it.

(Dockertiger) #4

Thanks for reply .but it is not my point .i mean only pull one copy on host ,other hosts should share this copy ,don’t need pull again. :grinning:

(David Maze) #5

I don’t think that’s possible, sorry. (AFAIK there’s no equivalent of, say, NFS for Docker images.)

(Remember that docker run will automatically pull an image if it doesn’t have it, so you’re not losing much in the way of either automation or performance by having it on a private registry.)

(Dockertiger) #6

Ok,got it ,thanks again anyway .

(Hvemuri) #7

What I do is I transform the image that I pulled from a registry into a tar file using “docker save” and then have this tar image available over NFS to multiple machines. Each machine then uses “docker load” to make a local copy of the image.

I wonder if it’s possible to have an NFS mountpoint for /var/lib/docker/image and have this shared across multiple hosts. If so this would be a more efficient way to pull the image once and make it available for multiple machines