docker-maven-plugin
docker-maven-plugin copied to clipboard
podman build fails with given buildx platforms
Description
I'm using docker-maven-plugin with podman, which was working fine so far. After I added the configuration for a specific build platform (linux/amd64), the builds fails with
[INFO] DOCKER> [my/project:latest]: Created docker-build.tar in 1 second
[WARNING] DOCKER> Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[WARNING] DOCKER> time="2024-10-16T18:53:27+02:00" level=warning msg="The --config flag is ignored by Podman. Exists for Docker compatibility"
[WARNING] DOCKER> Error: unrecognized command `podman buildx ls`
[WARNING] DOCKER> Try 'podman buildx --help' for more information
[INFO] DOCKER> docker --config /var/lib/jenkins/workspace/dummy_develop/blafasel/target/drum-dev/.docker.build/my/project/latest/docker buildx create --driver docker-container --name maven
[INFO] DOCKER> Emulate Docker CLI using podman. Create /etc/containers/nodocker to quiet msg.
[INFO] DOCKER> Error: unknown flag: --driver
[INFO] DOCKER> See 'podman buildx --help'
[ERROR] DOCKER> Error status (125) while creating builder maven
The section added to the docker-maven-plugin config (in "configuration.images.image.build") was:
<buildx>
<platforms>
<platform>${docker.platforms}</platform>
</platforms>
</buildx>
With docker.platforms = linux/amd64
.
NOTE: linux/amd64
is the native platform architecture. An alternate profile shall also perform builds for linux/arm64
.
Info
- docker-maven-plugin version : 0.45.0
- Maven version (
mvn -v
) :
Maven home: /var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/maven-3.9
Java version: 17.0.12, vendor: Red Hat, Inc., runtime: /usr/lib/jvm/java-17-openjdk-17.0.12.0.7-2.el8.x86_64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.18.0-553.22.1.el8_10.x86_64", arch: "amd64", family: "unix"
- ~~Docker~~ Podman version : 4.9.4-rhel
- If it's a bug, how to reproduce : It should probably sufficient to add the above buildx config to trigger the error.