I'm trying to achieve re tagging of docker images via docker command.
Basically I need to do the below steps to achieve my goal:
1)Pull an existing multi architecture image from private registry.
2)Tag it with new name (e.g: tag imagename-test to imagename-final)
3)And push the newly tagged image back to private registry again.
So I have tried the below command:
docker buildx build --tag {registry name/repository}/imagename-test --tag {registry name/repository}/imagename-final \
-- pull -- platform=linux/amd64,linux/arm64 \
-- push .
Here the image is getting pushed with both tags.But I need to tag imagename-test to imagename-final and only need to push imagename-final to the registry.
Usually we do,
docker pull imagename-test
docker tag imagename-test imagename-final
docker push imagename-final
Any suggestions to achieve this by using only docker buildx commands for multi architecture images?