For example, if I want start container from docker.com I use command
#!/bin/bash
sudo docker run -it busybox:latest
If I store this Image in my own registry with HTTPS access with Base AU (login and password)
what syntax I need to use?
Share and learn in the Docker community.
For example, if I want start container from docker.com I use command
#!/bin/bash
sudo docker run -it busybox:latest
If I store this Image in my own registry with HTTPS access with Base AU (login and password)
what syntax I need to use?
The syntax is the same, but your image needs to container the name of the registry. Some examples:
Even in case of the offical registry, you can do something like this:
sudo docker run -it docker.io/library/busybox:latest
Since this is the offical, default registry, using the registry name is optional
sudo docker run -it library/busybox:latest
And since this image is an official image, using the owner “library” is optional too
sudo docker run -it busybox:latest
Although you could still set the registry name without using the owner:
sudo docker run -it docker.io/busybox:latest
In case of any other registry, you alwayy need to have the registry hostname or IP address in the name of the image, and also the port number if that is not the default 443.
sudo docker run -it registry.yourdomain.tld:5000/busybox:latest
or
sudo docker run -it registry.yourdomain.tld:5000/yourusername/busybox:latest
Of course, before you can download the image, you need to push it to your registry, and before you push it, you need to set the tag containing the registry name/port and the correct path of your image.
In my case (my docker registry has basic AU) need firstly
docker login
The defined default is dockerhub. Thus said, I hope you actually added the servername after docker login
as otherwise every login attempt was for dockerhub…