Ubuntu helper images generated all platforms are of x86 arch
## Summary <!-- Briefly summarize the bug --> The [commit](https://gitlab.com/gitlab-org/gitlab-runner/-/commit/52e2092609bacdebc69c06638763363de32592c6) has added Ubuntu helper images for all the platforms. However the images generated for all platforms seems to be x86_64 images. All the ubuntu images are using amd64 dependencies instead using the arch-specific dependencies. ## Steps to reproduce <!-- What do you need to do to reproduce the bug? Please include job definitions or git repository structure if relevant --> Helper image job is responsible for creating all the alpine and ubuntu helper images. Reference job: https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1427096009 All the helper images are present in [this](https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1427096009/artifacts/browse/out/helper-images/) artefacts directory. You can test ubuntu images for any arch other than x86_64. Download it on your machine and use below commands to test it: ``` $ docker import prebuilt-ubuntu-s390x.tar.xz ubuntu-s390x-test:latest sha256:8dceacb2306054b033aecee0ec60253c02fa2c6f96b29153c09ea3972eee5d81 $ docker run --rm ubuntu-s390x-test:latest arch x86_64 ``` ## Actual behavior <!-- What actually happens --> The Ubuntu based helper images created for platforms other than linux/amd64 are not appropriate as all the images seem to be of x86 architecture. ## Expected behavior <!-- What you should see instead --> The Ubuntu based helper images created for each platform should work on respective platform. Eg: Ubuntu image for s390x arch should give below output: ``` $ docker run --rm ubuntu-s390x-test:latest arch s390x ``` ## Relevant logs and/or screenshots <!-- Paste the job logs inside of the code blocks (```) below so it would be easier to read. --> Adding a snippet of log from helper-image [job](https://gitlab.com/gitlab-org/gitlab-runner/-/jobs/1427096009) for reference. As you can see that the image dowloads all the amd64 dependencies instead of s390x. <details> <summary> job log </summary> ```sh Building helper image for: linux/s390x based on ubuntu:20.04 docker-buildx Successfully created context "docker-buildx" buildx-builder #1 [internal] booting buildkit #1 pulling image moby/buildkit:buildx-stable-1 #1 pulling image moby/buildkit:buildx-stable-1 0.3s done #1 creating container buildx_buildkit_buildx-builder0 #1 creating container buildx_buildkit_buildx-builder0 0.5s done #1 DONE 0.8s #2 [internal] load build definition from Dockerfile.ubuntu #2 transferring dockerfile: 954B done #2 DONE 0.1s #3 [internal] load .dockerignore #3 transferring context: 2B done #3 DONE 0.0s #4 [internal] load metadata for docker.io/library/ubuntu:20.04 #4 DONE 0.6s #8 [internal] load build context #8 transferring context: 29.07MB 0.8s done #8 DONE 0.8s #5 [1/6] FROM docker.io/library/ubuntu:20.04@sha256:b3e2e47d016c08b3396b5eb... #5 resolve docker.io/library/ubuntu:20.04@sha256:b3e2e47d016c08b3396b5ebe06ab0b711c34e7f37b98c9d37abe794b71cea0a2 0.0s done #5 sha256:a31c7b29f4ad2bd946738970f040825704a523ded1b9d6f9c7c7cafc6ab731df 28.57MB / 28.57MB 0.5s done #5 extracting sha256:a31c7b29f4ad2bd946738970f040825704a523ded1b9d6f9c7c7cafc6ab731df #5 extracting sha256:a31c7b29f4ad2bd946738970f040825704a523ded1b9d6f9c7c7cafc6ab731df 1.0s done #5 DONE 1.5s #6 [2/6] RUN apt-get update && apt-get install -y bash ca-certificates dumb... #6 0.152 Get:1 http://security.ubuntu.com/ubuntu focal-security InRelease [114 kB] #6 0.321 Get:2 http://security.ubuntu.com/ubuntu focal-security/restricted amd64 Packages [368 kB] #6 0.374 Get:3 http://archive.ubuntu.com/ubuntu focal InRelease [265 kB] #6 0.400 Get:4 http://security.ubuntu.com/ubuntu focal-security/multiverse amd64 Packages [27.6 kB] #6 0.402 Get:5 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages [930 kB] #6 0.435 Get:6 http://security.ubuntu.com/ubuntu focal-security/universe amd64 Packages [779 kB] #6 0.880 Get:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB] #6 0.996 Get:8 http://archive.ubuntu.com/ubuntu focal-backports InRelease [101 kB] #6 1.116 Get:9 http://archive.ubuntu.com/ubuntu focal/universe amd64 Packages [11.3 MB] #6 1.717 Get:10 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages [1275 kB] ``` </details>
issue