spotify / docker-maven-plugin

INACTIVE: A maven plugin for Docker
Apache License 2.0
2.66k stars 575 forks source link

push image to registry fail #461

Closed bill202107 closed 3 years ago

bill202107 commented 3 years ago

Description

I want to save the image to tar with image name as ${project.artifactId}:${project.version}. At the same time I need to push the image to my registry. But I had no idea why this will fail.

<plugin> <groupId>io.fabric8</groupId> <artifactId>docker-maven-plugin</artifactId> <version>${fabric8io.docker.plugin.version}</version> <configuration> <tagName>latest</tagName> <pushRegistry>10.10.10.10/myrepo</pushRegistry> <saveName>${project.artifactId}:${project.version}</saveName> <saveFile>target/${project.artifactId}-${project.version}.tar</saveFile> <images> <image> <name>${project.artifactId}:${project.version}</name> </image> </images> </configuration> <executions> <execution> <id>default</id> <phase>package</phase> <goals> <goal>build</goal> <goal>tag</goal> <goal>save</goal> <goal>push</goal> </goals> </execution> </executions> </plugin>

[Describe the actual results] [ERROR] DOCKER> Unable to push 'xxx:1.0.021-SNAPSHOT' to registry '10.10.10.10:443/myrepo' : denied: requested access to the resource is denied [denied: requested access to the resource is denied ]

Software:

bill202107 commented 3 years ago

I had also configure the image name with registry and it can pushed. But it save the image name with the registry which isn't I want. <image> <name>10.10.10.10/myrepo/${project.artifactId}:${project.version}</name> </image>