Change to more stable Kaniko image
When using gcr.io/kaniko-project/executor:debug
and trying to push to the Docker Hub registry url https://index.docker.io/v2/
the build fails with
error checking push permissions -- make sure you entered the correct tag name,
and that you are authenticated correctly, and try again: checking push permission for
"foo/bar:bionic-99": UNAUTHORIZED: authentication required; [map[Action:pull Class:
Name:mgit/clamav Type:repository] map[Action:push Class: Name:foo/bar Type:repository]
Currently fixed by using url https://index.docker.io/v1/
.
However Kaniko suggest using v2
https://github.com/GoogleContainerTools/kaniko#pushing-to-docker-hub. Possible solutions would be to use the Kaniko image mgit/base:kaniko-executor-debug-stable
(name suggest a more stable image?) as mention in post https://github.com/GoogleContainerTools/kaniko/issues/1209#issuecomment-624592854.