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

bug(common): cannot build docker on mac due to platform switch #13295

Closed
srl295 opened this issue Feb 20, 2025 · 0 comments · Fixed by #13318
Closed

bug(common): cannot build docker on mac due to platform switch #13295

srl295 opened this issue Feb 20, 2025 · 0 comments · Fixed by #13318
Assignees
Labels
Milestone

Comments

@srl295
Copy link
Member

srl295 commented Feb 20, 2025

Build on (intel) mac fails

$ resources/docker-images/build.sh
[resources/docker-images] build.sh parameters: <>
[resources/docker-images] Building image for base
noble: Pulling from library/ubuntu
5a7813e071bf: Download complete 
Digest: sha256:72297848456d5d37d1262630108ab308d3e9ec7ed1c3286a32fe09856619a782
Status: Downloaded newer image for ubuntu:noble
docker.io/library/ubuntu:noble

What's next:
    View a summary of image vulnerabilities and recommendations → docker scout quickview ubuntu:noble
[+] Building 0.1s (2/2) FINISHED                                                                                                                                                                docker:desktop-linux
 => [internal] load build definition from Dockerfile                                                                                                                                                            0.0s
 => => transferring dockerfile: 1.96kB                                                                                                                                                                          0.0s
 => ERROR [internal] load metadata for docker.io/library/ubuntu:noble                                                                                                                                           0.0s
------
 > [internal] load metadata for docker.io/library/ubuntu:noble:
------
Dockerfile:4
--------------------
   2 |     
   3 |     ARG UBUNTU_VERSION=latest
   4 | >>> FROM ubuntu:${UBUNTU_VERSION}
   5 |     
   6 |     LABEL org.opencontainers.image.authors="SIL Global."
--------------------
ERROR: failed to solve: ubuntu:noble: failed to resolve source metadata for docker.io/library/ubuntu:noble: no match for platform in manifest: not found
Docker 4.38.0 (full version info)
$ docker version
Client:
 Version:           27.5.1
 API version:       1.47
 Go version:        go1.22.11
 Git commit:        9f9e405
 Built:             Wed Jan 22 13:37:19 2025
 OS/Arch:           darwin/amd64
 Context:           desktop-linux

Server: Docker Desktop 4.38.0 (181591)
 Engine:
  Version:          27.5.1
  API version:      1.47 (minimum version 1.24)
  Go version:       go1.22.11
  Git commit:       4c9b3b0
  Built:            Wed Jan 22 13:41:17 2025
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.7.25
  GitCommit:        bcc810d6b9066471b0b6fa75f557a15a1cbf31bb
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e946
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

Non-workaround

  • If I turn off buildkit (and use the deprecated builder) I get further, however, our dockerfiles use RUN << which is not supported on the old builder.

Workaround

The solution seems to be to remove the --platform amd64 line from the docker build script. And then it "works" but I am not sure what the right final solution is. The only thing I can think of is to have a switch on the build script that skips the --platform command.

@srl295 srl295 added the common/resources/ Build infrastructure label Feb 20, 2025
@mcdurdin mcdurdin added this to the B18S2 milestone Feb 21, 2025
@mcdurdin mcdurdin changed the title bug(resources): cannot build docker on mac due to platform switch bug(common): cannot build docker on mac due to platform switch Feb 21, 2025
ermshiperete added a commit that referenced this issue Feb 21, 2025
Passing this parameter causes docker image builds on mac to fail (#13295).
Since `amd64` is the default anyways (and we don't support other values),
we can simply remove that parameter.

Fixes: #13295
@github-project-automation github-project-automation bot moved this to Done in Keyman Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants