Docker Community Forums

Share and learn in the Docker community.

How to create a private docker registry

(Scorpio786) #1

Hi There,
I have a Network File System (NFS). I want to make it my private docker registry. I want to save all my docker images into that particular NFS. Is there any possible way to do that ?

(Jeff Anderson) #2

You could mount the nfs share, and then use that as the location for the local storage driver when you run the registry server.

(Scorpio786) #3

I mounted the nfs in server and I ran the registry image using following commands:

docker run -d -p 5000:5000 --restart=always --name registry -v /nfs_location:/var/lib/registry registry

After this when I am pulling the images or saving containers its still saving in local, not in nfs.

(Scorpio786) #4

It worked. Thanks you so much for your help.

(Fscloud) #5

Hi scorpio786

Would this command you listed help create a private registry that we like to create like you here ?
We want to
1- remove public registry access.
2- increase the default /var/lib/registry size by removing the fault path but softlink to a different path using an already mounted Network Area Storage (NAS) path on our linux host.

Advance thanks for your response.