Notification texts go here Contact Us Buy Now!

How to properly dockerize maven project with jib

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.

Post a Comment

Cookie Consent
We serve cookies on this site to analyze traffic, remember your preferences, and optimize your experience.
Oops!
It seems there is something wrong with your internet connection. Please connect to the internet and start browsing again.
AdBlock Detected!
We have detected that you are using adblocking plugin in your browser.
The revenue we earn by the advertisements is used to manage this website, we request you to whitelist our website in your adblocking plugin.
Site is Blocked
Sorry! This site is not available in your country.