Closed eunomie closed 5 years ago
Question (haven't looked closely, so bear with me); will the image that was pushed be tagged? If not, it may be worth checking with the Docker Hub team; I seem to recall that images that have never been tagged may be garbage-collected after some time.
Haven't looked what the UX for this looks like, but there has been prior discussion in docker
about allowing push by digest; in that discussion, the format docker push <image-ID/digest> repository/name:tag
was rejected to keep the path open for pushing multiple images (docker push image1 image2 image3
).
There was an alternative proposal that was "accepted", but on hold, pending containerd integration; https://github.com/moby/moby/issues/38880#issuecomment-473016536
That alternative uses a flag (name to be decided on, but currently --local
) to specify the local image as "source", thus allowing pushing a single image, and tag it under multiple names, e.g. (from that comment);
docker push --local=<local-image> \
myregistry/an-image:v1 \
myregistry/an-image:v1.0 \
myregistry/an-image:v1.0.2 \
myregistry/an-image:latest
Question (haven't looked closely, so bear with me);
np 😉
will the image that was pushed be tagged?
Yes, images are tagged and then pushed, and then the index will allow to not be garbaged collected as they are referenced.
The main workflow was done in #76. This PR only adds the possibility to do it with a digest as the source and not an image.
In the case
contentDigest
is defined (for example after a build by docker app) try to push local docker image from the digest. In that case, theimage
of the service is not defined in the bundle.json.If
contentDigest
is empty, do the same thing as before, so try to resolve and if it's not resolvable try to push.The service name is now displayed in error messages to better understand what's going on on failures.
Signed-off-by: Yves Brissaud yves.brissaud@docker.com