How to make Custom Image
Learn what is required for your custom image.
We'll cover the following...
Referring to images unambiguously
Previously, when we named our image, we simply called it railsapp
. Similarly, Compose automatically named our web
service image myapp_web
.
Although these names worked fine when working on a single Docker Machine, they are not suitable for sharing our image on a Docker Registry. Why? Because what if different people, teams, or organizations all want to have an image called railsapp
or myapp_web
?
How would we know which image to refer to?
This is a solved problem. By referring to both the image name and a user account, we disambiguate which image we are referring to and allow people to call their images whatever they like without fear of name clashes.
Naming convention
We refer, unambiguously, to a particular image (more precisely, a specific version of an image) by using the following naming convention:
[<registry hostname>[:port]/]<username>/<image name>[:<tag>]
The Registry hostname is optional; leaving it out indicates you are referring to the default Registry: Docker Hub.
If a Registry hostname is provided without an explicit port, the standard SSL port 443 is assumed.
An account is needed to store images on a Registry, and an account can house any number of ...