Skip to content
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

The configured platforms don't match the Docker Engine's OS and architecture #4283

Open
Xirado opened this issue Jul 3, 2024 · 5 comments
Open

Comments

@Xirado
Copy link

Xirado commented Jul 3, 2024

Environment:

  • Jib version: 3.4.3
  • Build tool: Gradle 8.5
  • OS: Arch Linux x86_64, though it happens on Windows aswell

Description of the issue:
When running ./gradlew jibDockerBuild i get this error:

Execution failed for task ':jibDockerBuild'.
> com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: The configured platforms don't match the Docker Engine's OS and architecture (/)
Caused by: com.google.cloud.tools.jib.plugins.common.BuildStepsExecutionException: The configured platforms don't match the Docker Engine's OS and architecture (/)
   at com.google.cloud.tools.jib.plugins.common.JibBuildRunner.runBuild(JibBuildRunner.java:285)
   at com.google.cloud.tools.jib.gradle.BuildDockerTask.buildDocker(BuildDockerTask.java:126)
   at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
   at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:125)
   ... 118 more
Caused by: java.lang.IllegalStateException: The configured platforms don't match the Docker Engine's OS and architecture (/)
   at com.google.common.base.Preconditions.checkState(Preconditions.java:512)
   at com.google.cloud.tools.jib.builder.steps.StepsRunner.lambda$loadDocker$18(StepsRunner.java:628)
   at com.google.common.util.concurrent.TrustedListenableFutureTask$TrustedFutureInterruptibleTask.runInterruptibly(TrustedListenableFutureTask.java:131)
   at com.google.common.util.concurrent.InterruptibleTask.run(InterruptibleTask.java:75)
   at com.google.common.util.concurrent.TrustedListenableFutureTask.run(TrustedListenableFutureTask.java:82)

Expected behavior:
The image should be built and pushed to the local docker daemon

Steps to reproduce:
I don't know how to reproduce this 100%, i've had it work before, and fail the next day, the OS doesn't seem to matter since i've had it happen on both windows and linux.

jib-gradle-plugin Configuration:

jib.to.image = "xirado/bot-template"

Log output: Above

@Xirado
Copy link
Author

Xirado commented Jul 3, 2024

At first i thought this is related to #4265 but the error message seems to suggest the os and architecture from docker info is just empty, though i've myself checked and running it in the terminal returns desired results:

[marcel@archbtw ~]$ docker info
Client:
 Version:    26.1.4
 Context:    default
 Debug Mode: false

Server:
 ...
 Kernel Version: 6.9.7-arch1-1
 Operating System: Arch Linux
 OSType: linux
 Architecture: x86_64
 CPUs: 16
 Total Memory: 31.27GiB
 Name: archbtw
 ID: 68c963e8-9170-45dc-9efc-ba0092766782
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

@giraone
Copy link

giraone commented Jul 11, 2024

I am facing the same issue with version com.google.cloud.tools:jib-maven-plugin:3.4.3. When I downgrade to 3.4.2, everything works normal.

My output of docker info (actually I am running podman 3.4.2) is

host:
  arch: amd64
  os: linux
...
version:
  APIVersion: 3.4.2
  OsArch: linux/amd64
  Version: 3.4.2
``

@pschichtel
Copy link

I can also confirm this.

$ docker info
Client: Docker Engine - Community
 Version:    27.0.3
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.15.1
    Path:     /usr/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.28.1
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 0
 Server Version: 27.0.3
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: systemd
 Cgroup Version: 2
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: ae71819c4f5e67bb4d5ae76a6b735f29cc25774e
 runc version: v1.1.13-0-g58aa920
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
  cgroupns
 Kernel Version: 6.1.0-22-amd64
 Operating System: Debian GNU/Linux 12 (bookworm)
 OSType: linux
 Architecture: x86_64
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

The downgrade to 3.4.2 does also fix this for me as suggested by @giraone

@mpeddada1
Copy link
Contributor

Thanks for filing this issue and apologies for the inconvenience! 3.4.3 explicitly throws an exception when the docker info stats don't match the os/arch of the image jib is trying to build to the local docker daemon. However, this PR should address the failure you are facing: #4268 and will be included in the next release. For now, please continue using 3.4.2 if this is blocking you.

MarcelBochtler added a commit to boschglobal/ort-server that referenced this issue Aug 14, 2024
Due to the bug mentioned in [1], multiple developers cannot build the
images on their Apple Silicon Macs.
Downgrade to version 3.4.2 until the next version for the jib plugin is
released.

[1]: GoogleContainerTools/jib#4283

Signed-off-by: Marcel Bochtler <[email protected]>
github-merge-queue bot pushed a commit to eclipse-apoapsis/ort-server that referenced this issue Aug 14, 2024
Due to the bug mentioned in [1], multiple developers cannot build the
images on their Apple Silicon Macs.
Downgrade to version 3.4.2 until the next version for the jib plugin is
released.

[1]: GoogleContainerTools/jib#4283

Signed-off-by: Marcel Bochtler <[email protected]>
alvarosanchez added a commit to micronaut-projects/micronaut-maven-plugin that referenced this issue Oct 15, 2024
alvarosanchez added a commit to micronaut-projects/micronaut-maven-plugin that referenced this issue Oct 15, 2024
* Upgrade Test Resources

This commit bumps the test resources version in order to fix
integration with Control Panel.

* Bump Micronaut version

* Bump Micronaut versions in IT tests

* Fix type conversion error

* Bump to Test Resources 2.6.2

* micronaut 4.6.6

* Revert "micronaut 4.6.6"

This reverts commit d1973ed.

* Fix test

* Downgrade Jib due to GoogleContainerTools/jib#4283

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Sergio del Amo <[email protected]>
Co-authored-by: Álvaro Sánchez-Mariscal <[email protected]>
@sschuberth
Copy link
Contributor

sschuberth commented Oct 21, 2024

However, this PR should address the failure you are facing: #4268 and will be included in the next release.

So has this been fixed with release 3.4.4, and can be closed?

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

No branches or pull requests

6 participants