docker-maven-plugin
docker-maven-plugin copied to clipboard
noCache property ignored when using buildx
Description
When buildx is enabled, docker-maven-plugin ignores the docker.noCache
property. I tried setting the property via the Maven command line and via buildOptions
in the POM file with the same result, the docker build cache is used in both cases:
mvn clean verify -Ddocker.noCache=true
<configuration>
<images>
<image>
...
<buildx>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<buildOptions>
<noCache>true</noCache>
<buildOptions>
</build>
</image>
</images>
</configuration>
Info
- docker-maven-plugin version : 0.43.0
- Maven version (
mvn -v
) :
Apache Maven 3.8.6 (84538c9988a25aec085021c365c560670ad80f63)
Maven home: /opt/homebrew/Cellar/maven/3.8.6/libexec
Java version: 17.0.2, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk@17/17.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "12.6.6", arch: "aarch64", family: "mac"
- Docker version :
Docker version 20.10.22, build 3a2c30b
- If it's a bug, how to reproduce : Set
docker.noCache
property to true via Maven CLI when buildx is enabled - If it's a feature request, what is your use case : N/A
- Sample project : N/A
This seems to be resolved with v0.44.0
@Mikep86 : Could you please try with v0.44.0 ?
@Mikep86 : I remember I've merged a pull request for this functionality https://github.com/fabric8io/docker-maven-plugin/pull/1717