You can only push images to a registry if the image tag matches the registry domain. The process for tagging and pushing is the same as with Docker Hub, but you need to explicitly include the local registry domain in the new tag. These commands pull my registry server image from Docker Hub and add a new tag, making it suitable to be pushed to the local registry:
docker image pull dockeronwindows/ch04-registry:2e
docker image tag dockeronwindows/ch04-registry:2e registry.local:5000/infrastructure/registry:v2.6.2
The docker image tag command specifies the source tag first, and then the target tag. You can change every part of the image name for the new target tag. I've used the following:
- registry.local:5000 is the registry domain. The original image name had an implied domain of docker.io.
- infrastructure is the account name...