This involves pulling the image to my local host, tagging it there,
and pushing it up again.
It seems to me there should be a way of tagging the image in the
remote repository without the above faff, but I couldn't find an
answer on Google.
Fundamentally these 3 steps (pull/tag/push) are required if the registry is remote but there are some tricks to fast up that if the registry is own.
1.If the current docker host has the updated image in its local repository you can can skip the pull :
docker tag registry.digitalocean.com/foo/bar:dev-123 registry.digitalocean.com/foo/bar:prd-123
docker push registry.digitalocean.com/foo/bar:prd-123
2.If the remote registry is a private registry that you can connect to, you can strongly improve that (pulling and pushing may be slow according to the image size) by performing the task from the machine hosting that registry.
It would be only two quite fast steps now :
docker tag registry.digitalocean.com/foo/bar:dev-123 registry.digitalocean.com/foo/bar:prd-123
docker push registry.digitalocean.com/foo/bar:prd-123
3.If you cannot perform these tasks from that machine directly, you can still use the docker -H HOST
way to connect to the remote Docker Daemon of that registry (if that is enabled of course):
docker -H registry.digitalocean.com tag registry.digitalocean.com/foo/bar:dev-123 registry.digitalocean.com/foo/bar:prd-123
docker -H registry.digitalocean.com push registry.digitalocean.com/foo/bar:prd-123
For series of large images that I have to tag in private registries, I always favor these ways when possible.