Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot run Bazel under QEMU #119

Open
3 tasks done
JamieMagee opened this issue Feb 16, 2024 · 0 comments
Open
3 tasks done

Cannot run Bazel under QEMU #119

JamieMagee opened this issue Feb 16, 2024 · 0 comments

Comments

@JamieMagee
Copy link

JamieMagee commented Feb 16, 2024

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

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: bazelbuild/bazel#11379

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant