I am using mvnw -Pprod verify jib:dockerBuild
to build the docker image for my jHipster project and I am getting:
Failed to execute goal com.google.cloud.tools:jib-maven-plugin:3.2.1:dockerBuild (default-cli)Build to Docker daemon failed, perhaps you should make sure your credentials for 'registry-1.docker.io/library/eclipse-temurin' are set up correctly. See https://github.com/GoogleContainerTools/jib/blob/master/docs/faq.md#what-should-i-do-when-the-registry-responds-with-unauthorized for help: Unauthorized for registry-1.docker.io/library/eclipse-temurin: 401 Unauthorized
[ERROR] {"details":"incorrect username or password"}
What actually need the authorization? Is it for pulling the eclipse-temurin? or is it pushing something to registry-1.docker.io?
temurin
in this case) don't requires authentication. You do need to authenticate. It is just that you can skip sending a username and a password for public images. Apparently, Jib was able to pick up some credentials on your machine and sent them to Docker Hub. Then, Docker Hub reports that the username and password given to the server are wrong (e.g., typo). Check the Jib log to figure out where it was able to pick up the username and password. Removing them will make it work.registry-1.docker.io
is Docker Hub. Simply doingdocker login
would have the same effect asdocker login registry-1.docker.io
. Anyways, since you logged in successfully, now it should work fine.