Open GrahamDumpleton opened 4 years ago
hey @GrahamDumpleton,
If you rerun just kbld with nothing changed, you get the error: Expected to find same repo digest...
hmm, it seems that podman-docker returns multiple digests for the same locally tagged image. that's not the behaviour of docker inspect.
So looks like kbld should be working out what the digest is from the image on the remote image registry after it has been pushed
kbld expects docker to record a digest at the time of the push (it uses docker inspect to retrieve it). it also expects that digest matches what was pushed to registry. it looks like podman-docker does not offer same API guarantees as docker, hence it is not compatible with kbld today.
kbld does not ask registry for the digest because pushing process should know what the digest is (given that it's pushing content), and there is no good way to ask registry in a "non-racy" way. theoretically asking registry for the digest for a tag is racy because someone else can override the tag meanwhile.
i havent run podman before, but it might be worth adding it as a builder.
@GrahamDumpleton can it be a problem on podman side? Related to this (https://github.com/containers/libpod/issues/3761)(https://github.com/containers/libpod/issues/3761) maybe?
This issue seems to be similar to https://github.com/k14s/kbld/issues/19 but the setup is different.
Have a typical setup for
kbld
where it is doing image build and pushing image to remote registry. When it fills out the image digest reference in the deployment, it is using the digest which matched what was stored in local image build cache. The digest which the image was stored under in the remote image registry is different though, meaning the image cannot be found by the deployment.Final step of
kbld
outputs:Inspection of the image in the local build cache yields:
The image reference in the deployment is:
The error from
kapp
when deploying is:If you rerun just
kbld
with nothing changed, you get the error:which also appears to be picking up the mismatch.
As far as the setup goes, the builds are being done with
podman
using thepodman-docker
wrapper on Fedora which results inpodman
being invoked whendocker
is run. Thuspodman
is used to push the image to the remote registry. The remote registry self hosted latest version of the standard Docker image registry.The image registry was empty before starting. After
kbld
run, have:Running
skopeo
to inspect the remote image get:So looks like
kbld
should be working out what the digest is from the image on the remote image registry after it has been pushed, rather than assuming the image will have the same digest value.cc @jorgemoralespou