I'm using the spring boot maven plugin to create my docker image. This works as expected however I am struggling to publish the generated image to docker. I've looked at the examples on the spring boot maven plugin reference but having no joy with it. I have run: docker login -u me
on the terminal and able to push manually
When I use the following configuration in the spring boot plugin:
<docker>
<publishRegistry>
<url>https://index.docker.io/v1</url>
<username>me</username>
<password>password</password>
<email>me@gmail.com</email>
</publishRegistry>
</docker>
I receive: Execution pkg of goal org.springframework.boot:spring-boot-maven-plugin:2.5.3:build-image failed: Error response received when pushing image: denied: requested access to the resource is denied
When using this:
<docker>
<publishRegistry>
<url>https://index.docker.io/v1</url>
<username>me</username>
<token>hub.docker.com-generated-token</token>
<email>me@gmail.com</email>
</publishRegistry>
</docker>
I receive: Execution pkg of goal org.springframework.boot:spring-boot-maven-plugin:2.5.3:build-image failed: Error response received when pushing image: unauthorized: refresh_token grants not allowed
I've tried looking around for a working example but having no luck. Would anyone be able to point out the folly of my ways?
Many thanks
spring-boot: 2.5.3
java: 16.0.1
linux: mint 20.2
I needed to add the image.name
. Format: ghcr.io/me/my-app:1.0.0
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.