Bootstrap FreeKB - Docker - Upload an image to a registry using the docker push command
Docker - Upload an image to a registry using the docker push command

Updated:   |  Docker articles

This assumes you have installed Docker on Linux and Docker is running and that you have created your own private registry.

A Docker image contains the code used to create a Docker container, such as creating a Nginx web server, or a mySQL server, or a home grown app, and the list goes on. In this way, an image is like a template used to create a container. An image is kind of like a virtual machine, but much more light weight, using significantly less storage a memory (containers are usually megabytes in size).

 

Before pushing an image to your own private registry, you'll want to use the docker images command to return the list of images that have already been pulled down, like this.

docker images

REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
foo                 latest              105b54dc64f1        32 hours ago        196.7 MB

 

The docker push command followed by the name of your private registry and name and tag of the image will push the image to your private registry.

docker push docker.registry.example.com/foo:latest

 




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter 9ea00c in the box below so that we can be sure you are a human.