I am working on a joint development with another company and we have separate docker regsitry, DNS etc. If I build a docker image and use it as base image in other projects like
the other party, who will use the same source to build the image could not resolve the DNS name abc-registry.com. How can I make the docker registry prefix in the FROM directive dynamic ? Are Dockerfile templates our only option ?
You can set up an additional shared repository.
To copy an image to the shared repo
docker pull my-repo.com/myImage docker tag my-repo.com/myImage shared-repo.com/ourImage docker push shared-repo.com/ourImage
And they can do
This way they have a fixed prefix, and the image name is whatever you choose.