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 Fix 0xc000007b Error banner
    Fix 0xc000007b Error on Windows 11 While Launching a Game Windows
  • ChatGPT on Linux
    Set Up and Use ChatGPT in Linux Terminal Linux
  • banner
    What is Phishing Resistant Multi-Factor Authentication? Security | Vulnerability Scans and Assessment
  • front
    How to trigger SQS from a Lambda Function in the same account AWS/Azure/OpenShift
  • banner
    How to fix Git always asking for my Username and Password Version Control System
  • How to Convert Google Forms Into Microsoft Forms banner
    Convert Google Forms Into Microsoft Forms Microsoft Exchange/Office/365
  • onedrived43
    How to share Files and Restore Previous versions of Files in Microsoft OneDrive Backup
  • windows 10 technical preview windows 10 logo microsoft 97543 1920x1080
    Disable the sleep mode in Windows to never turn off the display Windows

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 Pocket (Opens in new window) Pocket
  • 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

  • openstack ola
    Openstack Deployment with Devstack Linux
  • Locate Find and Grep Required 1
    A Brief Introduction to Linux and How to Create Disk Partition in Ubuntu Linux Linux
  • Screenshot 2021 02 14 at 00.35.50
    How to manage automatic login on Ubuntu Linux Linux
  • feature photo quit vim
    How to Exit Linux Vim or Vi Editor Linux
  • trip wire feature
    How to install and configure Tripwire on Ubuntu Linux
  • Run Linux on Windows Server
    How to install Windows Subsystem for Linux on Windows Server Linux

More Related Articles

openstack ola Openstack Deployment with Devstack Linux
Locate Find and Grep Required 1 A Brief Introduction to Linux and How to Create Disk Partition in Ubuntu Linux Linux
Screenshot 2021 02 14 at 00.35.50 How to manage automatic login on Ubuntu Linux Linux
feature photo quit vim How to Exit Linux Vim or Vi Editor Linux
trip wire feature How to install and configure Tripwire on Ubuntu Linux
Run Linux on Windows Server How to install Windows Subsystem for Linux on Windows Server 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

  • How to Fix 0xc000007b Error banner
    Fix 0xc000007b Error on Windows 11 While Launching a Game Windows
  • ChatGPT on Linux
    Set Up and Use ChatGPT in Linux Terminal Linux
  • banner
    What is Phishing Resistant Multi-Factor Authentication? Security | Vulnerability Scans and Assessment
  • front
    How to trigger SQS from a Lambda Function in the same account AWS/Azure/OpenShift
  • banner
    How to fix Git always asking for my Username and Password Version Control System
  • How to Convert Google Forms Into Microsoft Forms banner
    Convert Google Forms Into Microsoft Forms Microsoft Exchange/Office/365
  • onedrived43
    How to share Files and Restore Previous versions of Files in Microsoft OneDrive Backup
  • windows 10 technical preview windows 10 logo microsoft 97543 1920x1080
    Disable the sleep mode in Windows to never turn off the display Windows

Subscribe to Blog via Email

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

Join 1,832 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

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

Copyright © 2025 TechDirectArchive

 

Loading Comments...
 

You must be logged in to post a comment.