RegistryDockerImage does not properly push if the pull URL and push URL for a registry are split
Observed Behavior
<RegistryDockerImage ... registry={{ external: url1, internal: url2 }} />
When RegistryDockerImage goes to push to url1, it instead creates a tag for the image locally that points to url2 which will fail if the pusher (usually LocalDockerImage or BuildkitDockerImage) cannot reach or authenticate with url2. The error is something like:
[deploy:run:deploy:act] : --Error while Pushing image 'runner:latest' to localhost:6000
Error: Command failed with exit code 1: docker push 172.17.0.2:5000/runner:latest
The push refers to repository [172.17.0.2:5000/runner]
Get https://172.17.0.2:5000/v2/: http: server gave HTTP response to HTTPS client
In the case above, the registry is running in a docker container. The localhost push via http would work from the host, but using the internal docker IP of the registry container will fail since the docker client will want to use https.
Expected Behavior
RegistryDockerImage will push to a label for url1 making the image available at url2 assuming the registry is correctly configured.