How to upload a docker image to the Docker Registry

October 11, 2022

Lang: cs en de es

If you use Docker and work in teams, you need to share Docker images. The Docker Registry is used to share Docker images. I'll describe what docker registries are, how to use them, and most importantly how to upload your image to the registry in this article.....

If you use Docker and work in teams, you need to share Docker images. The Docker Registry is used to share Docker images. I'll describe what docker registries are, how to use them, and most importantly how to upload your image to the registry in this article.....

What is the Docker Registry?

Docker Registry is a server application that provides an organized storage space and distribution system for named Docker images (image).
A Docker image of the same name can have several different versions, which are identified by tags.
As a user you then download, from the docker registry, a specific finished docker image to yourself or wherever you need it. Or you can upload a new docker image you have created to the docker registry. If you have the appropriate access rights, of course.

Docker registry is open-source software distributed under the Apache license. The source code can be found on GitHub.

Docker and the Registry

By default, Docker works with the registry DockerHub. It is a publicly available instance of the Docker registry. However, it is possible to run an on-premise Docker registry as it has free source code. And also a commercially supported version called Docker Trusted Registry. There are other public registries available on the Internet.
The GitLab - a tool for management, versioning, CI/CD and project management also includes a Docker registry.

Working with the docker registry

Login

Downloading docker images is typically publicly available. However, in order to upload, you will first need to log in

Log in to the gitlab docker registry:

 docker login registry.gitlab.cz
You will be asked for a username and password.

Login to the docker registry at dockerhub.com

docker login -u josefjebavy
You will be asked for a password, since you have already entered a name.

Build docker image

When you have to upload a custom docker image, you have to create it first. That is to say, do a build. You can find this in more detail in the article How to build a docker image.

To actually build and tag the image, use the command:

docker build ./ -t josefjebavy/debian-apache-php8.1:latest

To upload or push docker image to the registry, use the following command:

docker push josefjebavy/debian-apache-php8.1:latest

If you push to docker hub, you can check the upload via the web interface. That is, there was an image created with a new name or an image of an existing name has a new image.
For gitlab you can see this in the section: Packages & Registries > Container Registry

My docker images

My docker images on docker hub. Typically you will find images with different versions of PHP. And images ready to run sample Nette or Symphony web applications.

The source code for this is on my github.

More articles on docker

Video tutorial: uploading a docker image to the docker registry

A detailed video tutorial on how to build a docker image and then upload that image to a public docker image database called DockerHub, can be found in this video:

Close

Like Docker, Docker registries make your job easier. Learn to use new things and streamline your and your team's operations.

If you want to think about streamlining processes at your work feel free to contact us. for a no-obligation discussion about what I can help you with.

Articles on a similar topic

VMware vs Proxmox: performance comparison
GitLab CI/CD: test automation and application deployment
Migrating VPS from VMware to Proxmox
VMware licensing change
Running Microsoft SQL Server on Linux
Backup: the Proxmox Backup Server
Linux as a router and firewall
Linux: logical volume management
Linux Software RAID
Running a web application behind a proxy
Mailbox migration
Docker multistage build
Backing up your data by turning on your computer
Podman
Importing Windows into Proxmox virtualization
Docker and PHP mail
Proxmox virtualization
Docker and Cron
Lenovo ThinkPad X1 Carbon: LTE modem EM7544 commissioning
Yocto Project: Build custom operating system for embedded devices
Preparing a Linux server to run a web application in Python
How to address poor file share performance in Docker
How to get started using Docker correctly
Installing Linux on a dedicated HPE ProLiant DL320e server
How to stress test a web application
Why use the JFS filesystem
How to boot from a 4TB drive with GTP using UEFI
Btrfs file system
Raspberry PI
WINE - running Windous programs under Linux
GNU/Linux operating system

Newsletter

If you are interested in receiving occasional news by email.
You can register by filling in your email news subscription.


+