Join our Discord Server
Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 570+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 8900+ members and discord server close to 2200+ members. You can follow him on Twitter(@ajeetsraina).

Running Docker Private Registry server Frontend UI

1 min read

Are you planning to setup own Docker private registry in your lab? Are you planning to bring all the in-house developers to work internally with the Docker code for your customer requirement which you might not be interested to expose to the external world? Do you want to see all the tagged images in UI rather than logging into the host server and running lengthy list of images.If yes, then this is going to be perfect guide for you.

https://collabnix.com/archives/2903

Let’s say you have dozens of Docker images which you have recently committed but you want them to push to your private repository rather than Docker hub. First of all, run the below command to setup private registry in a single shot:

Settting up Local Registry Server

~# docker run -d -p 5000:5000 -v \
/mnt/container_volumes/docker_registry/:/tmp/registry registry
Unable to find image ‘registry’ locally
Pulling repository registry
1694982b51a1: Download complete
d3a1f33e8a5a: Download complete
c22013c84729: Download complete
d74508fb6632: Download complete
91e54dfb1179: Download complete
83a38368e5e3: Download complete
d770c6c01e28: Download complete
99c8eb1b53d1: Download complete
9d041e8edc7b: Download complete
0f2f1cbafe0e: Download complete
49a7a2995fdc: Download complete
0408c3f0abf5: Download complete
d59f2efbdcce: Download complete
9b2e6b2af83a: Download complete
2ef8b5c0a6773bb59c11917baa769cf7327722350903cc75500cdc5c831fac36
:~#

The above command uses the mounted storage volume /mnt/container_volumes/docker_registry/ to dump all the registry data.

Verifying the Registry Server
Verify that registry is up and running through http://10.94.214.186:5000

docker_regsitry

It shows the entry “\”docker-registry server\”” which means it is up and running

Pushing an image to Private Docker registry

Now lets push an image to our private repository:

Say, I have an ubuntu image where I am going to install a customized puppet pulling it form my local repository.

#docker run -it ubuntu /bin/bash
#apt-get install puppet

Press Ctrl+P & Q to come out of container shell without stopping it.

Committing the container

#docker commit -m “Puppet_Docker” -a “Ajeet Raina” 11ac6 collabnix/puppet_docker:v1.0

# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL
SIZE
collabnix/puppet_docker v1.0 f5640376af3e 2 minutes ago 224.5 MB

Tagging the Docker Image

root@dell-virtual-machine:~# docker tag f564037 localhost:5000/collabnix/puppet_docker:v1.0

Pushing the Docker image to Private Registry

~# docker push localhost:5000/collabnix/puppet_docker:v1.0
The push refers to a repository [localhost:5000/collabnix/puppet_docker] (len: 1)
Sending image list
Pushing repository localhost:5000/collabnix/puppet_docker (1 tags)
d3a1f33e8a5a: Image successfully pushed
c22013c84729: Image successfully pushed
d74508fb6632: Image successfully pushed
91e54dfb1179: Image successfully pushed
f5640376af3e: Image successfully pushed
Pushing tag for rev [f5640376af3e] on {http://localhost:5000/v1/repositories/collabnix/puppet_docker/tags/v1.0}

Setting up Docker Registry UI

Lets try out an interesting UI for our registry server.

#docker run -d -e ENV_DOCKER_REGISTRY_HOST=10.94.214.186 -e ENV_DOCKER_REGISTRY_PORT=5000 -p 8080:80 konradkleine/docker-registry-frontend
d131104e34a33d42c577c7dfb29cd05cf6d572ed6e174166ad102bc01b9b5a0f

Just one command and you can see a fancy UI for our registry server.

docker-front-end-1

docker_registry_frontend

Cool..here we go. A Docker registry with cool UI is up and running.

Have Queries? Join https://launchpass.com/collabnix

Ajeet Raina Ajeet Singh Raina is a former Docker Captain, Community Leader and Arm Ambassador. He is a founder of Collabnix blogging site and has authored more than 570+ blogs on Docker, Kubernetes and Cloud-Native Technology. He runs a community Slack of 8900+ members and discord server close to 2200+ members. You can follow him on Twitter(@ajeetsraina).
Join our Discord Server