docker / setup-qemu-action

GitHub Action to install QEMU static binaries
https://github.com/marketplace/actions/docker-setup-qemu
Apache License 2.0
458 stars 61 forks source link

Cannot run Bazel under QEMU #119

Open JamieMagee opened 9 months ago

JamieMagee commented 9 months ago

Contributing guidelines

I've found a bug, and:

Description

I'm trying to build this Dockerfile which runs bazel. This works under linux/amd64 on GitHub Actions, but using this action to emulate arm64 I get the following error message:

439.5 Opening zip "/proc/self/exe": lseek(): Bad file descriptor
439.5 FATAL: Failed to open '/proc/self/exe' as a zip file: (error: 9): Bad file descriptor

Expected behaviour

Container builds successfully

Actual behaviour

Build fails with the error message:

439.5 Opening zip "/proc/self/exe": lseek(): Bad file descriptor
439.5 FATAL: Failed to open '/proc/self/exe' as a zip file: (error: 9): Bad file descriptor

Repository URL

https://github.com/JamieMagee/sorbet-build-image-builder

Workflow run URL

https://github.com/JamieMagee/sorbet-build-image-builder/actions/runs/7934432975/job/21665414237#step:6:3511

YAML workflow

on:
  push:
  pull_request:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          repository: 'sorbet/sorbet-build-image'
      - name: Set up QEMU
        uses: docker/setup-qemu-action@v3
      - name: Set up Docker Buildx
        uses: docker/setup-buildx-action@v3
      - name: Login to GHCR
        uses: docker/login-action@v3
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}
      - name: Build and push
        uses: docker/build-push-action@v5
        with:
          context: .
          platforms: linux/amd64,linux/arm64
          push: ${{ github.ref == 'refs/heads/main' && true || false }}
          tags: ghcr.io/jamiemagee/sorbet-build-image:latest
          cache-from: type=gha
          cache-to: type=gha,mode=max

Workflow logs

logs_4.zip

BuildKit logs

No response

Additional info

Related: https://github.com/bazelbuild/bazel/issues/11379