Repository navigation
Closed
Description
Description
Since the version 0.43.3 the push goal fails with buildx. Looks like it lacks buildx create that was present in 0.43.2 maybe?
Copying in the output from different versions for comparison.
0.43.2:
[INFO] --- docker:0.43.2:build (build) @ <...> ---
[INFO] Building tar: <...>/tmp/docker-build.tar
[INFO] DOCKER> [<...>]: Created docker-build.tar in 839 milliseconds
[INFO] DOCKER> docker buildx create --driver docker-container --name maven --node maven0
[INFO] DOCKER> maven
[INFO] Expanding: <...>/tmp/docker-build.tar into <...>/tmp/docker-build
[INFO] DOCKER> docker buildx build --progress=plain --builder maven --platform linux/amd64 --tag <...> --build-arg <...> --file=<...>/tmp/docker-build/Dockerfile <...>/tmp/docker-build --load
[INFO] DOCKER> #1 [internal] booting buildkit
(builds successfully)
[INFO] --- docker:0.43.2:push (push) @ <...> ---
[INFO] DOCKER> docker buildx create --driver docker-container --name maven --node maven0
[INFO] DOCKER> maven
[INFO] Expanding: <...>/tmp/docker-build.tar into <...>/tmp/docker-build
[INFO] DOCKER> docker buildx build --progress=plain --builder maven --platform linux/amd64,linux/arm64 --tag <...> --build-arg <...> --file=<...>/tmp/docker-build/Dockerfile <...>/tmp/docker-build --push
[INFO] DOCKER> #1 [internal] load build definition from Dockerfile
(pushes successfully)
0.43.4:
[INFO] --- docker:0.43.4:build (build) @ <...> ---
[INFO] Building tar: <...>/tmp/docker-build.tar
[INFO] DOCKER> [<...>]: Created docker-build.tar in 683 milliseconds
[INFO] DOCKER> Using Docker CLI 20.10.24
[INFO] DOCKER> docker --config <...>/docker buildx create --driver docker-container --name maven
[INFO] DOCKER> maven
[INFO] Expanding: <...>/tmp/docker-build.tar into <...>/tmp/docker-build
[INFO] DOCKER> docker --config <...>/docker buildx build --progress=plain --builder maven --platform linux/amd64 --tag <...> --build-arg <...> --file=<...>/tmp/docker-build/Dockerfile <...>/tmp/docker-build --load
[INFO] DOCKER> #1 [internal] booting buildkit
(builds successfully)
INFO] --- docker:0.43.4:push (push) @ <...> ---
[INFO] DOCKER> Using Docker CLI 20.10.24
[INFO] Expanding: <...>/tmp/docker-build.tar into <...>/tmp/docker-build
[INFO] DOCKER> docker buildx build --progress=plain --builder maven --platform linux/amd64,linux/arm64 --tag <...> --build-arg <...> --file=<...>/tmp/docker-build/Dockerfile <...>/tmp/docker-build --push
[INFO] DOCKER> ERROR: open <path to DOCKER_CONFIG>/buildx/instances/maven: no such file or directory
[ERROR] DOCKER> Error status (1) when building
Info
- docker-maven-plugin version : 0.43.3 0.43.4
- Maven version (
mvn -v) :
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/apache-maven-3.9.6
Java version: 17.0.9, vendor: Amazon.com Inc., runtime: /usr/lib/jvm/java-17-amazon-corretto
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-1103-aws", arch: "amd64", family: "unix"
- Docker version : 20.10.24-r2
- If it's a bug, how to reproduce :
- If it's a feature request, what is your use case :
- Sample project : [GitHub Clone URL]
Metadata
Metadata
Assignees
Labels
No labels
Activity
rohanKanojia commentedon Feb 8, 2024
@luke-sterkowicz : Are you on macOS environment? Do you have some reproducer project with which I can reproduce your issue?
luke-sterkowicz commentedon Feb 9, 2024
@rohanKanojia this is linux (alpine 3.17) - see some details in maven version. I don't have a reproducer project; can see if it's possible easily (if absolutely necessary). Looks like it's specific to a DOCKER_CONFIG and --config override?
rohanKanojia commentedon Feb 10, 2024
@luke-sterkowicz : Is it possible to ugrade docker version to latest one? I see you're using
20.xrohanKanojia commentedon Feb 12, 2024
@luke-sterkowicz : I've reverted some of the changes I made in 0.43.4.
Could you please try out Docker Maven Plugin Snapshots and see if it fixes your issue.
luke-sterkowicz commentedon Feb 12, 2024
@rohanKanojia thanks for looking into this! I've tested the snapshot and it seems fine. The push goal doesn't re-create the buildx container, but the
--configis passed properly and it works.I've also checked the newer Docker (25.x) with the official plugin. It does not complain about missing config, however (for push):
[INFO] DOCKER> ERROR: no builder "maven" foundThe snapshot works fine here too.
rohanKanojia commentedon Feb 12, 2024
@luke-sterkowicz : Thanks a lot for testing SNAPSHOT version. I'll ask some other users for feedback too this week and will cut a release in coming weekend.
rohanKanojia commentedon Feb 17, 2024
@luke-sterkowicz : I've released 0.44.0 that should fix for your issue. Would appreciate if you could try it out and provide feedback.
luke-sterkowicz commentedon Feb 19, 2024
@rohanKanojia wonderful - works like charm! Thanks a lot for help.