Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Containers » How to Set up Private Docker Registry

How to Set up Private Docker Registry

Posted on 29/08/202221/07/2023 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on How to Set up Private Docker Registry
PRIVATE-DOCKER-REGISTRY

When created, container images are saved in a location where they can be accessed for more innovation and updates. Furthermore, you can share these images with multiple users across different hosts because developers and testers require access to images during various development and testing phases. Thus, you can use this shared storage location with a software solution that provides security features and image version control via tags. In addition, image repositories are collections of images that are part of the same project or are grouped according to context. At the same time, a prefix to the image name identifies the repository. Image registries, on the other hand, hold image repositories. So, here’s a guide on how to set up a private docker registry.

You can find other similar guides here: How to Fix MS Excel Crash Issue and How to Fix Hyper-V Virtual Machine Stuck in Stopping State and How To Install Nextcloud on a Linux system also How to install Zabbix Monitoring Tool on a Linux System and How to install Golang on a Linux System

Find more guides here: How to reveal the WiFi password of the Network you are connected to in Windows and How to install Zabbix Monitoring Tool on a Linux System and How to Install Docker Portainer on Linux, and How to Install MongoDB on a Linux System also How to install AnyDesk on a Linux Machine and How to install Golang on a Linux System

Steps to Set up a Private Docker Registry

Here’s a step-by-step guide to setting up a private docker registry.

Step 1: Pull the docker registry image from docker hub

sudo docker pull distribution/registry
How to Set up a Private Docker Registry-registry
docker pull

Step 2: Run Docker’s registry container image

Then, let’s create a private registry using Docker’s registry container image with the command:

 docker run -d -p 5000:5000 --restart=always --name registry registry:2
How to Set up a Private Docker Registry-dockerrun
docker run

We mapped the registry’s port 5000 to the host port5000 while it was running in a “registry” container so that we could access it via localhost.

Step 3: Populate the registry

There are currently no images in the private registry. So, let’s populate it by retrieving an image from the public registry Docker Hub, tagging it, and pushing it into the private registry while also listing local cache registries to validate

docker image pull alpine:3.14
How to Set up a Private Docker Registry-docker-alpine
alpine

Afterwards, verify what we have with the command:

docker images
How to Set up a Private Docker Registry-alpine
docker images

Step 4: Set up Private Docker Registry by tagging the image

Then, tag the newly pulled image:

docker image tag alpine:3.14 localhost:5000/myalps
How to Set up a Private Docker Registry-tag
alpine tagged

In addition, verify this with docker images

How to Set up a Private Docker Registry-docki
docker images

Step 5: Push the tagged image

Subsequently, push the newly tagged image to the private registry:

docker image push localhost:5000/myalps
pushed-1
pushed

Step 6: Set up Private Docker by removing cached image

Then, we will remove cached images alpine 3:14 and localhost:5000/myalps

 docker image rm alpine:3.14
rm
rm alpine
 docker image rm localhost:5000/myalps
rm-alp
rm localhost

Afterward, verify with docker images

sudo docker images
sudorrr
alpine removed

Step 7: Pull the images

Let’s pull the images from the private registry

sudo docker image pull localhost:5000/myalps
pulledpr
localhost from private repo

Verify this with docker images

taggedlocal
image from private repo

Step 8: remove docker images

Let’s remove images that are no longer needed after successfully validating that the private registry can store container images and be used to push and pull images to and from it.

docker image rm -f registry:2
dockerrm
docker rm

We can also do the same with the tagged image using the command:

docker image rm localhost:5000/myalps
taggeduuu
tagged image removed

Summary

In conclusion, images need to be stored after they have been created, and a perfect place to store container images will be a private docker registry. The steps to create one are shown above. You can set up a private docker registry with the steps mentioned above.

Rate this post

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Containers, Linux Tags:docker registry

Post navigation

Previous Post: How to Fix Microsoft Excel Crash Issues
Next Post: How to install Redis on Linux System

Related Posts

  • Slide1 1
    Create Multiple Users with Passwords in Ubuntu Linux Linux
  • Screenshot 2024 02 28 at 11.17.41 PM
    GitHub Pages Deployment Guide Linux
  • openstack ola
    Openstack Deployment with Devstack Linux
  • whois4578uh
    How to get Domain information using WHOIS Command in Linux Linux
  • Install Packages to Amazon Virtual Machine Using Terraform
    How to Install Packages to Amazon VM using Terraform AWS/Azure/OpenShift
  • sshkey
    How to perform SSH key-based authentication in Linux Linux

More Related Articles

Slide1 1 Create Multiple Users with Passwords in Ubuntu Linux Linux
Screenshot 2024 02 28 at 11.17.41 PM GitHub Pages Deployment Guide Linux
openstack ola Openstack Deployment with Devstack Linux
whois4578uh How to get Domain information using WHOIS Command in Linux Linux
Install Packages to Amazon Virtual Machine Using Terraform How to Install Packages to Amazon VM using Terraform AWS/Azure/OpenShift
sshkey How to perform SSH key-based authentication in Linux Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

sysadmin top30a

  • update set expire
    Windows 10 and Windows 11 updates will now expire for better performance Windows
  • Veeam backup and replication update
    How to update Veeam Backup and Replication [VBR] Backup
  • cisco catalyst switch 1
    How to Reset a Cisco 3650 Catalyst Switch Network | Monitoring
  • M365 Users
    Manage MS365 Accounts with PowerShell Microsoft Exchange/Office/365
  • tmgexchange2013owachangepasswordform
    How to change your password in Outlook Web Access Network | Monitoring
  • updates
    How to stop Windows from applying updates Windows
  • Mendeley Cite with MSWord Issue resolved
    Mendeley Cite ECITE40001 Error: Fix issue using Microsoft Word Desktop application Mac
  • Telegram Bot for wordpress
    Configure Telegram to receive Blog Notifications JIRA|Confluence|Apps

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,824 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

Active Directory AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Server 2016

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.