saml2aws icon indicating copy to clipboard operation
saml2aws copied to clipboard

Failed to resolve: ubuntu:jammy on docker-build-environment make script on macOS Intel chip

Open tinaboyce opened this issue 2 years ago • 1 comments

Issue

Running the "make docker-build-environment" on a MacBook Pro 2019 Intel chip will result in "ERROR: failed to solve: ubuntu:jammy: no match for platform in manifest" error been thrown

➜  saml2aws git:(master) ✗ make docker-build-environment
docker build --platform=amd64 -t saml2aws/build -f Dockerfile.build .
[+] Building 2.4s (3/3) FINISHED                                                                                         docker:desktop-linux
 => [internal] load build definition from Dockerfile.build                                                                               0.0s
 => => transferring dockerfile: 2.61kB                                                                                                   0.0s
 => [internal] load .dockerignore                                                                                                        0.0s
 => => transferring context: 50B                                                                                                         0.0s
 => ERROR [internal] load metadata for docker.io/library/ubuntu:jammy                                                                    2.4s
------
 > [internal] load metadata for docker.io/library/ubuntu:jammy:
------
Dockerfile.build:2
--------------------
   1 |     # base image
   2 | >>> FROM ubuntu:jammy
   3 |     ENV TZ=Australia/Sydney
   4 |     RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
--------------------
ERROR: failed to solve: ubuntu:jammy: no match for platform in manifest sha256:2b7412e6465c3c7fc5bb21d3e6f1917c167358449fecac8176c6e496e5c1f05f: not found
make: *** [docker-build-environment] Error 1

Reproduce

  1. Run make docker-build-environment

Notes

I have attempted to run the make docker-build-environment with the updated script where I removed the --platform=amd64 flag, ie docker build -t saml2aws/build -f Dockerfile.build . and a Docker image has been successfully created. It has gone passed the FROM section of the Dockerfile.build but then I have noticed the Dockerfile.build execute commands with references to the arm64 architecture instead, ie. RUN echo "deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports jammy main restricted" >> /etc/apt/sources.list. I have tested the created image but it failed test (test passed in local machine) so simply removing --platform=amd64 is not the solution.

tinaboyce avatar Nov 29 '23 13:11 tinaboyce

does docker run --rm --platform=linux/amd64 ubuntu:jammy work?

gliptak avatar Jan 15 '24 21:01 gliptak

@tinaboyce is this still an issue?

mapkon avatar May 01 '24 03:05 mapkon

@mapkon and @gliptak , I've since got a MBP with the M3 chip and could no longer confirm if this is an issue on the MBP Intel chip.

tinaboyce avatar May 02 '24 10:05 tinaboyce

I recommend closing and open a new issue if/when reproduced

gliptak avatar May 02 '24 19:05 gliptak