0
附加標籤我有fabric8泊塢窗 - Maven的插件在我的pom.xml配置如下:fabric8泊塢窗 - Maven的插件:包括構建
<build>
...
<plugins>
...
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<version>${docker.plugin.version}</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
</executions>
<configuration>
<images>
<image>
<name>${docker.image.prefix}/${project.artifactId}:%l</name>
<build>
<dockerFile>Dockerfile</dockerFile>
<assembly>
<descriptorRef>artifact</descriptorRef>
</assembly>
</build>
</image>
</images>
</configuration>
</plugin>
...
</plugins>
...
</build>
我使用%l
佔位符,其標記的如果版本包含-SNAPSHOT
,則使用latest
標籤的圖像,否則使用pom版本。 從CI構建時,我想包含一些額外的標記(可能多於一個)到我的圖像(例如內部版本號/分支名稱),但我想保留%l
佔位符行爲。 我認爲應該可以從命令行使用maven屬性,但是我無法從插件文檔中找到它(https://dmp.fabric8.io/)
如何在執行docker時創建額外的標籤:構建目標?