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?
Error while building docker image using jib
3.2k Views Asked by Abin At
2
Approach that worked for me:
Using your cmd/terminal logout from docker using
docker logout
command.Next login to docker from cmd/terminal using
docker login
command.You will be prompted to enter your username and password (one you used for creating your dockerhub account).
After successful login try executing the command
mvn compile jib: dockerBuild
.