docker-maven-plugin icon indicating copy to clipboard operation
docker-maven-plugin copied to clipboard

noCache property ignored when using buildx

Open Mikep86 opened this issue 1 year ago • 3 comments

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

Mikep86 avatar Jun 05 '23 20:06 Mikep86

This seems to be resolved with v0.44.0

poikilotherm avatar Apr 12 '24 06:04 poikilotherm

@Mikep86 : Could you please try with v0.44.0 ?

rohanKanojia avatar Apr 12 '24 07:04 rohanKanojia

@Mikep86 : I remember I've merged a pull request for this functionality https://github.com/fabric8io/docker-maven-plugin/pull/1717

rohanKanojia avatar Apr 12 '24 11:04 rohanKanojia