Skip to content
Advertisement

Can’t install bash in multiarch build on Alpine

I am trying to build image for linux/arm64/v8 on linux/amd64 Gitlab runner. I run it with this command:

JavaScript

My Dockerfile is fairly simple:

JavaScript

But it fails with:

JavaScript

It’s Gitlab runner version 13.4.1 and Docker executor docker:stable. What can I do about this issue?

Advertisement

Answer

There were three problems with my approach:

  1. I needed to install buildx extension
JavaScript
  1. I had to install emulators through qemu
JavaScript
  1. I was hosting the Gitlab runner on a CentOS 7 with Kernel 3.13, which is not supported by qemu. After update to Ubuntu 20.04 with Kernel version 5.4 it worked just fine.
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement