Skip to content

TechDirectArchive

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

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

Creating and Deploying Docker Registry Using Docker Image

Posted on 19/09/202129/08/2026 Imoh Etuk By Imoh Etuk 1 Comment on Creating and Deploying Docker Registry Using Docker Image
  1. Home
  2. AWS/Azure/OpenShift
  3. Creating and Deploying Docker Registry Using Docker Image
header-picture
Docker Registry

Creating and deploying a Docker registry gives you the autonomy to manage your images within your network, ensuring security, compliance, and faster access without relying on external resources.

First, What is Docker Registry? The Registry is a stateless, highly scalable server-side application that stores and lets you distribute Docker images. In addition, the Registry is open-source, under the permissive Apache license. It is also considered as a storage and content delivery system that holds named Docker images, available in various tagged versions. Hence, you can use it for hosting your own registry using the open-source Docker Registry. This tutorial explains how to create and deploy Docker registry.

For information about Docker Hub, which offers a hosted registry with additional features such as teams, organizations, webhooks, automated builds, etc, use  Docker Hub which is a managed cloud-based registry. Therefore, for full steps on how to pull an image from Docker Hub, see the related article.

Docker has become one of the most popular, largest and one of the most widely adopted containerized platforms by organization for hosting and sharing their application codes with their team. It is an open source containerization platform that enables developers to package applications into containers. For deep insights into what Docker is all about see this article. For further reading check this out.

When to use registry

You should use the Registry if you want to:

  • tightly control where your images are being stored
  • fully own your images distribution pipeline
  • integrate image storage and distribution tightly into your in-house development workflow

Few differences between Docker Registry and Docker Hub

  • Docker registries are used to host and distribute Docker Images
  • Docker Hub is Docker’s official cloud-based registry
  • To get started with Docker Hub, you can pull (download) an image or push (upload) one of your local images

So, in this writeup, I will take you through the steps required to pull a docker image, tag it to your local registry and push it to your own registry. See related articles where I took time to explain how to Pull your first Nginx Container Image from Docker Hub and deploy it to your local machine. In this related article, I covered the steps on how to download and install Docker Desktop including Windows Subsystem for Linux (WSL2), the difference between Containers VS Virtual Machine as well as the difference between Docker Image and Container.

Deploying your Docker Registry

Before you can deploy your registry server you need to have the Docker Desktop host installed on your local system following the steps in the related article on how to Pull your first Nginx Container Image from Docker Hub and deploy it to your local machine. Thus, it is time to launch the application after installation and inspect the interface as shown in the screenshot below.

Docker-desktop-screen
Docker Desktop Screen

As you can see there are no containers currently running on our runtime environment. Let’s manage some containers by creating before we start pushing them to Docker Hub.

The following steps will take you through how to deploy a registry server

  1. Run a local Registry

To create local docker registry, use the command below:

docker run -d -p 5000:5000 --restart=always --name registry registry:2

The registry is ready now. See screenshot.

Registry-is-ready-main
Registry is running
Please note that these first few examples show registry configurations that are only appropriate for testing. You must protect a production-ready registry with TLS. For more information on deploying a production-ready registry see configuration guide.

Pull an image from Docker Hub to your registry

You can pull an image from Docker Hub and push it to your registry. The following example pulls the nginx image from Docker Hub and re-tags it as my-nginx, then pushes it to the local registry. Finally, the nginx and my-nginx images are deleted locally and the my-nginx image is pulled from the local registry.

  1. Pull the nginx image from Docker Hub.
docker pull nginx

2. Then, tag the image as localhost:5000/my-nginx. Following this, it creates an additional tag for the existing image. When the first part of the tag is a hostname and port, Docker interprets this as the location of a registry, when pushing.

docker tag nginx:latest localhost:5000/my-nginx
Container-Images-in-Registry
Container Images in local host

From the screenshot above, you can see the registry we created earlier, the nginx image pulled from docker hub and the image we just tagged as localhost:5000/my-nginx

So, having tagged the image as confirmed from the screenshot below, it’s time to push the image to my local registry. My local registry is located at localhost:5000

Tagged-Image
Tagged Container Image

3. Push the image to the local registry running at localhost:5000:

docker push localhost:5000/my-nginx
Pushed-Image-1
Image pushed to local registry

4. Next step is to remove the locally-cached nginx and localhost:5000/my-nginx images, so that you can test the pulling of the image from your registry. However, this does not remove the localhost:5000/my-nginx  image from your registry.

 docker image remove nginx
 docker image remove localhost:5000/my-nginx
Removed-Image-1
Locally-cached images removed

5. Pull the localhost:5000/my-nginx image from your local registry.

docker pull localhost:5000/my-nginx
Image-Pulled-from-Local-Registry
Image Pulled from Local Registry

Start the Nginx container image

Use the docker run command to run the image you have just pulled from your registry:

docker run -d -p 8080:80 localhost:5000/my-nginx

The command above shows that the image will run in detached mode, and use tcp port 8080 while the tcp port for the image on the local registry is 80.

Congratulations! You can now browse to your container at http://localhost:8080 to view the running container as shown in the screenshot below.

Web-page-screenshot
Nginx Container Image Web Page

Now, we’ve successfully created and deployed Docker Registry.

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
AWS/Azure/OpenShift Tags:containers, docker, docker hub, docker image, docker registry

Post navigation

Previous Post: RDP Users are unable to change Passwords
Next Post: How to use Container Insights for Azure Kubernetes Workload

Related Posts

  • Install Packages to Amazon Virtual Machine Using Terraform
    How to Install Packages to Amazon VM using Terraform AWS/Azure/OpenShift
  • Simple Notification Service AWS SNS
    Create Simple Notification Service (SNS) Notification on AWS AWS/Azure/OpenShift
  • awscli56
    Configure AWS Command Line Interface AWS/Azure/OpenShift
  • Azure App Service
    How to Restore Deleted Azure App Service Using PowerShell Automation
  • Screenshot 2024 02 09 at 1.06.54 PM
    Programmatically Deploying App Service Resources in Azure AWS/Azure/OpenShift
  • Generate SSH Keys
    Associate SSH Public key with Azure Linux VM AWS/Azure/OpenShift

More Related Articles

maxresdefault 2 5 Why am I unable to ping the Public IP Address of an EC2 instance AWS/Azure/OpenShift
Backup for Microsoft 365 and Azure Veeam Backup Deployment options for Microsoft 365 Data AWS/Azure/OpenShift
OpenShift DR Hero e1784641900398 Backing Up OpenShift Is Not the Same as Recovering It AWS/Azure/OpenShift
Docker Guide Pull and Deploy Nginx Container Images from Docker Hub AWS/Azure/OpenShift
DeleteAzureVM Remove Azure VM: How to delete a Virtual Machine via the Azure Portal AWS/Azure/OpenShift
Screenshot 2024 02 09 at 7.34.18 PM How to create a Logic App for monitoring tweets AWS/Azure/OpenShift

Comment (1) on “Creating and Deploying Docker Registry Using Docker Image”

  1. Avatar photo fawef says:
    25/03/2022 at 6:34 PM

    people should be aware that this method is useless for deploying to kubernetes which ignores local registries and tries to use docker.io

    Log in to Reply

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

  • BitLocker Protection off Update UEFI BIOS to fix issues
    BitLocker Protection off: Update UEFI/BIOS to fix issues Windows
  • 785509289 780x439
    Integrate Pleasant Password Server with Active Directory Password Manager
  • Keb
    How to configure a service account for Kerberos delegation Windows Server
  • connect to RDP automatically
    RDP Configuration Settings: Connect automatically to RDP session Windows
  • How to Check what files are taking up space
    WinDirStat: Check what files are taking up space on Windows Windows
  • MSDTworkaround
    Microsoft Support Diagnostic Tool Vulnerability Fix Windows
  • Featured Image 1
    How to enable or disable a Remote WMI Connection in Windows Windows
  • queryremoteinstalledapps
    Get a list of installed programs locally or remotely in Windows 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,745 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.