Skip to content

Buildx fails to push since 0.43.3 #1749

Closed

Description

@luke-sterkowicz

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]

Activity

  1. rohanKanojia commented on Feb 8, 2024

    @rohanKanojia
    Member

    @luke-sterkowicz : Are you on macOS environment? Do you have some reproducer project with which I can reproduce your issue?

  2. luke-sterkowicz commented on Feb 9, 2024

    @luke-sterkowicz
    Author

    @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?

  3. rohanKanojia commented on Feb 10, 2024

    @rohanKanojia
    Member

    @luke-sterkowicz : Is it possible to ugrade docker version to latest one? I see you're using 20.x

  4. rohanKanojia commented on Feb 12, 2024

    @rohanKanojia
    Member

    @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.

  5. luke-sterkowicz commented on Feb 12, 2024

    @luke-sterkowicz
    Author

    @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 --config is 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):

    • in 0.43.3 it fails with [INFO] DOCKER> ERROR: no builder "maven" found
    • in 0.43.4 it fails with 403 trying to pull the base image (so the auth data seems lost).

    The snapshot works fine here too.

  6. rohanKanojia commented on Feb 12, 2024

    @rohanKanojia
    Member

    @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.

  7. rohanKanojia commented on Feb 17, 2024

    @rohanKanojia
    Member

    @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.

  8. luke-sterkowicz commented on Feb 19, 2024

    @luke-sterkowicz
    Author

    @rohanKanojia wonderful - works like charm! Thanks a lot for help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions