Issue: Docker pull access denied for a private base image.
Solution: Perform docker logout
and re-login with the correct credentials.
Explanation:
- The error message indicates that the base image is a private image, not a public image.
- To pull a private image, you need to be authenticated with the appropriate credentials.
- The
docker logout
command clears any existing authentication credentials. - The
docker login
command allows you to re-authenticate with the correct credentials.
Alternatively, you can specify the base image credentials in the jib-maven-plugin
configuration.
Example:
<configuration> <from> <image>my-private-registry.io/my-private-image:latest</image> </from> <to> <image>my-docker-hub-username/my-image:latest</image> </to> <auth> <username>my-docker-hub-username</username> <password>my-docker-hub-password</password> </auth> </configuration>
After making these changes, you should be able to successfully dockerize your Maven project with Jib.