Problem to solve
Since I upgraded Gitlab-Runner from 19.1 to 19.2 I get “exec format error” when running commands within a container using a different platform. Does anyone else experience this?
Steps to reproduce
E.g. on amd64 machine, trigger a job with platform for docker image and run a shell command
image:
docker:
platform: linux/arm64
Configuration
See “Steps to reproduce”
Versions
Please select whether options apply, and add the version information.
- Self-managed
-
GitLab.com SaaS
- Dedicated
- Self-hosted Runners
Versions
- GitLab: 19.2.0
- GitLab Runner: 19.1.1 (working) / 19.2.0 (issue)
Hi @unclej84,
Thanks for reporting this issue.
Given that this started right after upgrading to Runner 19.2 and worked on 19.1.1, it’s very likely a regression in GitLab Runner’s Docker/platform handling rather than something expected.
To get this in front of the Runner team, could you please open a bug in the gitlab-org/gitlab-runner project with these details:
- Go to: GitLab.org / gitlab-runner · GitLab
- Click Issues → New issue and pick the Bug template.
- Include:
-
A minimal .gitlab-ci.yml that reproduces the problem (showing the full image: block with docker: platform: linux/arm64).
-
Your runner config.toml (at least the executor, the [runners.docker] section, and the host OS/architecture – e.g. amd64).
-
Docker version and the output of these commands run directly on the runner host:
docker info
docker run --platform=linux/arm64 <same-image> uname -m
bash
-
The job log excerpt from “Preparing the “docker” executor” down to the exec format error.
-
Exact versions: GitLab and GitLab Runner 19.1.1 (working) vs 19.2.0 (failing).
If you can share the issue link back here once it’s created, others hitting the same problem can follow along.
After preparing all the steps, I am a bit concerned that it might be something else because
docker run --platform=linux/arm64 ubuntu:24.04 uname -m
also gave me
exec /usr/bin/uname: exec format error
on the host directly.
After some digging, if found that the emulator might be missing, so I ran
docker run --privileged --rm tonistiigi/binfmt --install all
on the runner host and afterwards I got aarch64 as output and also the runner was working again.
So everything fine again but I am still wondering why it was working with runner version 19.1.1 but not 19.2.0.
Ticket can be found here.
Hi @unclej84,
Thanks for following up and glad you found the tonistiigi/binfmt workaround and got things running again. Since docker run --platform=linux/arm64 … was also failing directly on the host, it does point to missing binfmt/QEMU rather than a Runner 19.2 regression.
The issue you opened at gitlab-org/gitlab-runner is still useful, though: it clearly shows how 19.2 surfaces this scenario, and gives the Runner team a concrete repro plus a workaround. They might decide to document this better (or add a clearer hint when exec format error happens in a cross-arch platform setup), so thank you for filing it and linking all the details.