Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security, Veeam & DevOps

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form

How to Set up Private Docker Registry

Posted on 29/08/202215/08/2026 Raphael Gab-Momoh By Raphael Gab-Momoh No Comments on How to Set up Private Docker Registry
  1. Home
  2. Containers
  3. 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.

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
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

  • Security enhanced linux
    How to setup SELinux on a Linux server Linux
  • trip wire feature
    How to install and configure Tripwire on Ubuntu Linux
  • chamedk8s featured
    Install CNF Certified Kubernetes in AWS AWS/Azure/OpenShift
  • greywireshark
    How to install WireShark on a Linux Ubuntu System Linux
  • GitLabrunner 1 1
    There has been a runner system failure: failed to start the process exec “pwsh” Containers
  • MV command in Linux
    Rename or Move Files or Directories in Linux with Bash Terminal Linux

More Related Articles

HOW TO AUTOMATE A PROCESS IN LINUX@ Shell Scripting: How to Automate a Process in Linux Linux
Gfeature How to install Googler on a Linux System Linux
feature photo terraform How to install Amazon RDS using Terraform Linux
1 pUEZd8z 1p 7ICIO1NZFA The package python-virtualenv has no installation candidate error Linux
FEATURE IMAGE BASE URL 1 How to solve cannot find a valid base URL for repo: base/7/x86_64 Linux
physical Linux Machine: Is it Virtual or a Physical server Linux

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

vexpert-badge-stars-5

Virtual Background

VEEAMLEGEND

Categories

Top 30 Sysadmin blog

veeaam100

Veeam Vanguard

  • Screenshot 2020 05 14 at 17.47.09
    Configure OpenSSH Server: A Quick Guide Linux
  • BitLocker result virtualization
    Create a web page to visualize the output of BitLocker Recovery Web Server
  • SUBVERSION FEATURE
    How to Install Apache Subversion on a Linux System Linux
  • WhatsApp Image 2022 02 20 at 4
    How to use Postman for your POST Request Web Server
  • microsoft confirms some pcs freeze after windows 10 2
    Information on BOOTP Vendor Extensions and DHCP Options Windows Server
  • tape cleaning e1778595685861
    How to perform Tape Drive Cleaning in Practice Network | Monitoring
  • Trellix ePO and Syslog integration
    Integrate Trellix ePolicy Orchestrator with a Syslog Server Security | Vulnerability Scans and Assessment
  • Webp.net resizeimage 2
    Add or Remove Network Interface from a VM in Azure AWS/Azure/OpenShift

Subscribe to Blog via Email

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

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

Tags

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

Copyright © 2026 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.