0

I logged in to docker normally, and the authentication information was also checked, but the jib build fails.

docker login
cat ~/.docker/config.json

{
    "auths": {
        "https://index.docker.io/v1/": {}
    },
    "credsStore": "desktop"
}%

Docker login is successful.

// build.gradle

    jib {
        from {
            image = "eclipse-temurin:17"
        }

        to {
            image = "username/${project.name}:${project.version}"
            tags = ["latest"]
        }
    }

and command ./gradlew jib

error message

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':jib-test:jib'.
> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: Build image 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

1 Answers1

1

Looks like a duplicate of these:

Try emptying config.json entirely or just delete the file. Particularly, remove the entry for "https://index.docker.io/v1/" and credsStore.

Chanseok Oh
  • 3,920
  • 4
  • 23
  • 63