-
Notifications
You must be signed in to change notification settings - Fork 643
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot build multiarch in CI using buildx and DMP 0.43.3 #1701
Comments
@poikilotherm : Thanks for reporting. Could you please share the difference in executed buildx commands in 0.43.0 and 0.43.3? 0.43.3 adds |
@rohanKanojia thx for the reply. Here are some outputs as requested. 0.43.0, taken from https://github.com/IQSS/dataverse/actions/runs/5866182102/job/15904575945:
0.43.3, taken from https://github.com/IQSS/dataverse/actions/runs/5860235371/job/15888066573:
I'm spotting the difference that with 0.43.3, a parameter |
@poikilotherm : What authentication method are you using? I had changed plugin behavior to not add Change of |
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@rohanKanojia You're right that --node maven0 was added since 0.43.2 which is working fine for our CIs. But we met the similar issue that it's failed after upgrading from 0.43.2 to 0.43.3. This issue can be found only when building in platform linux/arm64
The only difference is that --config /tmp/**/docker was added before buildx |
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
Looks like this is due to difference in docker CLI versions. Newer docker CLIs require |
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…#1701) Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (fabric8io#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
…ker CLI (#1701) + Always pass --config option in case of latest docker + Change default value of --node parameter to null Signed-off-by: Rohan Kumar <rohaan@redhat.com>
@poikilotherm : I've released 0.43.4 which should always send |
Works like a charm in CI. Will respond later about status on the M1 machine where things failed before. Thanks a ton for fixing this @rohanKanojia ! Much appreciated! |
This is breaking compatibility with previous version:
$ mvn -U clean docker:build -Ddocker.build=true
[INFO] Scanning for projects...
[INFO]
...
[INFO] DOCKER> Using Docker CLI 24.0.2
[INFO] DOCKER> docker --config /... create --driver docker-container --name maven
[INFO] DOCKER> unknown flag: --driver
[INFO] DOCKER> See 'docker --help'.
[INFO] DOCKER>
[INFO] DOCKER> Usage: docker [OPTIONS] COMMAND
[INFO] DOCKER>
[INFO] DOCKER> A self-sufficient runtime for containers
[INFO] DOCKER>
[INFO] DOCKER> Common Commands:
[INFO] DOCKER> run Create and run a new container from an image
[INFO] DOCKER> exec Execute a command in a running container
[INFO] DOCKER> ps List containers
[INFO] DOCKER> build Build an image from a Dockerfile
[INFO] DOCKER> pull Download an image from a registry
[INFO] DOCKER> push Upload an image to a registry
[INFO] DOCKER> images List images
[INFO] DOCKER> login Log in to a registry
[INFO] DOCKER> logout Log out from a registry
[INFO] DOCKER> search Search Docker Hub for images
[INFO] DOCKER> version Show the Docker version information
[INFO] DOCKER> info Display system-wide information
[INFO] DOCKER>
[INFO] DOCKER> Management Commands:
[INFO] DOCKER> builder Manage builds
[INFO] DOCKER> container Manage containers
[INFO] DOCKER> context Manage contexts
[INFO] DOCKER> image Manage images
[INFO] DOCKER> manifest Manage Docker image manifests and manifest lists
[INFO] DOCKER> network Manage networks
[INFO] DOCKER> plugin Manage plugins
[INFO] DOCKER> system Manage Docker
[INFO] DOCKER> trust Manage trust on Docker images
[INFO] DOCKER> volume Manage volumes
[INFO] DOCKER>
[INFO] DOCKER> Swarm Commands:
[INFO] DOCKER> swarm Manage Swarm
[INFO] DOCKER>
[INFO] DOCKER> Commands:
[INFO] DOCKER> attach Attach local standard input, output, and error streams to a running container
[INFO] DOCKER> commit Create a new image from a container's changes
[INFO] DOCKER> cp Copy files/folders between a container and the local filesystem
[INFO] DOCKER> create Create a new container
[INFO] DOCKER> diff Inspect changes to files or directories on a container's filesystem
[INFO] DOCKER> events Get real time events from the server
[INFO] DOCKER> export Export a container's filesystem as a tar archive
[INFO] DOCKER> history Show the history of an image
[INFO] DOCKER> import Import the contents from a tarball to create a filesystem image
[INFO] DOCKER> inspect Return low-level information on Docker objects
[INFO] DOCKER> kill Kill one or more running containers
[INFO] DOCKER> load Load an image from a tar archive or STDIN
[INFO] DOCKER> logs Fetch the logs of a container
[INFO] DOCKER> pause Pause all processes within one or more containers
[INFO] DOCKER> port List port mappings or a specific mapping for the container
[INFO] DOCKER> rename Rename a container
[INFO] DOCKER> restart Restart one or more containers
[INFO] DOCKER> rm Remove one or more containers
[INFO] DOCKER> rmi Remove one or more images
[INFO] DOCKER> save Save one or more images to a tar archive (streamed to STDOUT by default)
[INFO] DOCKER> start Start one or more stopped containers
[INFO] DOCKER> stats Display a live stream of container(s) resource usage statistics
[INFO] DOCKER> stop Stop one or more running containers
[INFO] DOCKER> tag Create a tag TARGET_IMAGE that refers to SOURCE_IMAGE
[INFO] DOCKER> top Display the running processes of a container
[INFO] DOCKER> unpause Unpause all processes within one or more containers
[INFO] DOCKER> update Update configuration of one or more containers
[INFO] DOCKER> wait Block until one or more containers stop, then print their exit codes
[INFO] DOCKER>
[INFO] DOCKER> Global Options:
[INFO] DOCKER> --config string Location of client config files (default
[INFO] DOCKER> "/Users/<REDACTED>/.docker")
[INFO] DOCKER> -c, --context string Name of the context to use to connect to the
[INFO] DOCKER> daemon (overrides DOCKER_HOST env var and
[INFO] DOCKER> default context set with "docker context use")
[INFO] DOCKER> -D, --debug Enable debug mode
[INFO] DOCKER> -H, --host list Daemon socket to connect to
[INFO] DOCKER> -l, --log-level string Set the logging level ("debug", "info",
[INFO] DOCKER> "warn", "error", "fatal") (default "info")
[INFO] DOCKER> --tls Use TLS; implied by --tlsverify
...
[INFO] DOCKER> -v, --version Print version information and quit
[INFO] DOCKER>
[INFO] DOCKER> Run 'docker COMMAND --help' for more information on a command.
[INFO] DOCKER>
[INFO] DOCKER> For more help on how to use Docker, head to https://docs.docker.com/go/guides/
[INFO] DOCKER>
[ERROR] DOCKER> Error status (125) while creating builder maven
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.094 s
[INFO] Finished at: 2023-08-23T12:50:29+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.43.4:build (default-cli) ...
...
Error status (125) while creating builder maven -> [Help 1] |
@jramosf : Could you please share a reproducer project? Which platform are you on? |
@jramosf : polite ping, Could you please share a reproducer project and the type of environment you're on? What difference do you see in executed docker commands when you run it with v0.43.0 and v0.43.4? |
This appears to be a problem with M2 Macs. I have an existing project that builds properly on Intel Mac however it throws the above error that @jramosf posted
I noticed something different in the structure of target folder between old & new Mac but I'm unsure if its of any significance We are currently using maven plugin version Edit: We use enterprise SSO for docker login if that matters |
@saravanaa14 : Do you mean this could be a bug in Docker CLI? |
no. All I'm saying is, this problem seems to be related to the plugin only.
In this above command generated, if I remove |
@saravanaa14 : Could you please share your docker CLI version? |
|
Apologies, did not see this. It's exactly the error you pasted above with Macs using Apple Silicon. |
Looks like we need to pass This works:
I had to create a config.json inside the docker folder, passing the docker folder as it's done by the plugin causes:
|
In case this helps anyone. I ran into this issue with these versions: Docker version 24.0.5, build ced0996 I then upgraded to the latest and greatest 4.23.0 and 24.0.6 and that still didn't help. A colleague had a setup that worked but was on an older version. One major difference was that he had this symlink. |
Hey I'm getting the same issue when building a multiarch on macOS. I'm feeling that the error is coming from this change: a339536 To describe a bit more, I'm building 2 images. With 0.43.2:First image:
Second image:
With 0.43.4:First image:
Second image:
Sounds like it was caused by this change: #1703 Some details about the versions I'm using:
I tried to add manually the node name but no luck. It's not taken into account: <plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<authConfig>
<push>
<username>${docker.push.username}</username>
<password>${docker.push.password}</password>
</push>
</authConfig>
<!-- Create multiple images -->
<images combine.self="override">
<image>
<external>
<type>properties</type>
<prefix>docker.noocr</prefix>
</external>
<build>
<buildx>
<nodeName>maven</nodeName>
</buildx>
</build>
</image>
<image>
<external>
<type>properties</type>
<prefix>docker.ocr</prefix>
</external>
<build>
<buildx>
<nodeName>maven</nodeName>
</buildx>
</build>
</image>
</images>
</configuration>
<executions>
<!-- Generate the docker images during the package phase -->
<execution>
<id>docker-build</id>
<phase>package</phase>
<goals>
<goal>build</goal>
</goals>
</execution>
<!-- Push the docker images during the "deploy" phase -->
<execution>
<id>docker-push</id>
<phase>deploy</phase>
<goals>
<goal>push</goal>
</goals>
</execution>
<execution>
<!-- There is no integration test, so we can skip that execution -->
<id>start-elasticsearch</id>
<phase>none</phase>
</execution>
<execution>
<!-- There is no integration test, so we can skip that execution -->
<id>stop-elasticsearch</id>
<phase>none</phase>
</execution>
</executions>
</plugin> This is still calling
As a workaround, I'm switching back to 0.43.2. Hope this helps. |
See #1695 This is caused by this change fabric8io/docker-maven-plugin#1703 I tried a workaround but no luck. See in fabric8io/docker-maven-plugin#1701 (comment)
@poikilotherm @dadoonet @drcca @tfactor2 @saravanaa14 : Hello, I've reverted some of my docker Could you please give a try to Docker Maven Plugin 0.44-SNAPSHOT and provide feedback on whether docker-maven-plugin is working as expected for your pipelines? |
I've released 0.44.0 . I've tested it by building and pushing image to I think your issue might be fixed by this new release. I would appreciate it if you could try it out and provide feedback. |
This is indeed fixing my issue. Thanks a lot! |
@poikilotherm Do you have a working multiarch build in Github actions? |
Description
While the new release 0.43.3 fixed the build problem on a Mac M1, it creates a new problem: multiarch builds using Buildx in a Github Action pipeline are no longer working after upgrading. Using an older version of the plugin, things are well in the CI (using 0.43.0 for quite some time now).
I see the following log entries from the runner. Here's the complete log output.
Info
mvn -v
) : Unknown, but recent (Github Runner provided)The text was updated successfully, but these errors were encountered: