ich dockerfile-Maven-Plugin mit der folgenden Konfiguration verwenden:Tagging geschaffenes Bild mit dockerfile-Maven-Plugin
<plugin>
<groupId>com.spotify</groupId>
<artifactId>dockerfile-maven-plugin</artifactId>
<version>1.3.6</version>
<executions>
<execution>
<id>build-image</id>
<goals>
<goal>build</goal>
</goals>
<configuration>
<tag>latest</tag>
<repository>root/${project.artifactId}</repository>
<buildArgs>
<APP_NAME>${project.artifactId}</APP_NAME>
</buildArgs>
</configuration>
</execution>
<execution>
<id>push-image</id>
<goals>
<goal>push</goal>
</goals>
<configuration>
<repository>${docker.registry.url}/root/${project.artifactId}</repository>
</configuration>
</execution>
</executions>
</plugin>
Projekt Bereitstellung fehlschlägt durch:
[INFO] The push refers to a repository [my-repository:9090/root/image-name]
[ERROR] An image does not exist locally with the tag: my-repository:9090/root/image-name
[WARNING] An attempt failed, will retry 1 more times
org.apache.maven.plugin.MojoExecutionException: Could not push image
.
.
.
das Repository unter dem Voranstellen Build-Ziel (ähnlich wie Push-Ziel) löst das Problem. Dann aber das lokal erstellte Bild, dem das Repository-Tag vorangestellt ist.
Keine Dokumentationsreferenz zur Ausführung des Tags vor Push-Task gefunden.
Mit anderen Worten, ich möchte, dass meine lokalen Docker Bilder 2 Bilder nach dem Plug-Ausführung enthalten:
REPOSITORY TAG IMAGE ID CREATED SIZE
root/image-name latest 7ac1144c607e 21 minutes ago 175MB
my-repository:9090/root/image-name latest 7ac1144c607e 21 minutes ago 175MB
Meine Docker Version: 17.06.0-ce