ARMv7 & ARMv8 containers fail to run on arm64 Linux Docker Runner
Asked by Gajesh Bhat:

Hello Atlassian team,

I am trying to run a Docker Container (ARM based) using Bitbucket Pipelines on a self hosted arm64 Linux Docker Runner. It is built as an ARMv8 image (I also tried ARMv7) and I built it locally using *buildx*on Docker. But when I try to execute it on the pipeline, it fails with a very unhelpful error message.

```
Unable to run script in container 174fb976-9b39-5b87-bb1c-47d803d3d601_d8bc178c-0d62-4519-8855-bafc52270781_clone. Container exited prematurely with code 1.
```

1. **Runner details**:

```
Runner matching labels: - runner.docker - linux.arm64 - self.hosted Runner name: Linux ARM Docker Runner Runner UUID: {.....} Runner labels: linux.arm64, self.hosted, runner.docker Runner version: current: 2.1.0 latest: 2.1.0
```

2. **Runner Platform** : I am using WSL on my local laptop to test this runner. The Runner (which is in turn a docker container) is running on WSL on my machine (Dell laptop with x86_64 architecture). The AMD64 Linux Docker Runners works correctly in this setup and can be used for Development and testing and I have configured the docker on WSL to support multiarc builds using QEMU.

3. My **Pipeline configurations** look something like this

```
      - step:

          name: "Container to Build ARMv7 and ARMv8 Software"

          size: 4x

          runs-on:

          - 'self.hosted'

          - 'linux.arm64'

          - 'runner.docker'

          script:

          - pipe: docker://workspace_name/repo_name:build_armv7_v8
```

4. I have a **couple of questions.**

1. Should arm64 Linux Docker Runners for Bitbucket Pipelines run on arm64 hardware ?
2. Can we build and run ARMv7 and ARMv8 Rust and Python based docker container images on arm64 Linux Docker Runner ?
3. Does arm64 Linux Docker Runners support Pipe functionality ? I saw the label *beta*while creating the runner and I am curious as to if there is a feature parity between x86_64 Linux Docker Runners and arm64 Linux Docker Runners.

Looking forward to your assistance and reply.

Regards,

Gajesh


Answers:
author: Theodora Boudale
body: Hi Gajesh,  

> Should arm64 Linux Docker Runners for Bitbucket Pipelines run on arm64 hardware ?

Linux Docker ARM self-hosted runners need to run on ARM infrastructure. Please also check the supported platforms mentioned here:

* <https://support.atlassian.com/bitbucket-cloud/docs/runners/>

The runners have not been tested on WSL, the Windows and MacOS platforms mentioned in the link are for Windows and MacOS self-hosted runners. I'm afraid that we cannot provide support for troubleshooting these issues if you use an unsupported platform.  

> Can we build and run ARMv7 and ARMv8 Rust and Python based docker container images on arm64 Linux Docker Runner ?

You can build and run arm images with the ARM self-hosted runners. You will need to use a custom dind image and do some additional setup. You can find an example here:

* <https://confluence.atlassian.com/bbkb/building-multi-architecture-docker-images-with-bitbucket-pipelines-1252329371.html>  

> Does arm64 Linux Docker Runners support Pipe functionality ?

Pipes can be used with ARM runners if they have been built to work on ARM. If there are any Atlassian-developed pipes that you would like to see supported on ARM, please feel free to let me know.

Kind regards,  
Theodora

comments: author: Gajesh Bhat
body: Thank you [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) . That helps clarify a lot of of doubts. As for the ARM supported Pipes, it would be good to have a ARM64 Python Package Build pipe by Bitbucket. It can help show an example of best practices to build Package Build Pipes that run on ARM infrastructure,

Regards,

Gajesh


author: Theodora Boudale
body: Hi Gajesh,

Thank you for the feedback. I created a feature request that you can vote for here:

* <https://jira.atlassian.com/browse/BCLOUD-23293>

Any updates will be posted in that feature request. Please note that I don't have an ETA to share, and features are implemented as per our policy [here](https://confluence.atlassian.com/support/implementation-of-new-features-policy-201294576.html).

Kind regards,  
Theodora


author: Gajesh Bhat
body: Thank you [@Theodora Boudale](/t5/user/viewprofilepage/user-id/818086) . Appreciate your help.

Regards,

Gajesh


Tags: bitbucket-cloud

bitbucket-pipelines

cloud