question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

buildx create fails on rootless docker with ping_group_range: invalid argument: unknown

See original GitHub issue

Troubleshooting

Before sumbitting a bug report please read the Troubleshooting doc.

Behaviour

Steps to reproduce this issue

  1. Install self hosted actions runner as directed here https://stackoverflow.com/questions/66137419/how-to-enable-non-docker-actions-to-access-docker-created-files-on-my-self-hoste & enable experimental features to enable buildx
  2. Run a github action that sets up buildx, then uses the login action, and then the buildx action
  3. observe the error
buildx call failed write sysctl key net.ipv4.ping_group_range: write /proc/sys/net/ipv4/ping_group_range: invalid argument: unknown

Expected behaviour

It builds correctly

Actual behaviour

I get an error

Configuration

on:
  push:
    branches:
      - '**'
name: UH Schedule CI

defaults:
  run:
    working-directory: 'uh/schedule'

jobs:
  test:
    name: Test
    runs-on: [self-hosted, linux, x64]
    container: node:14-slim
    steps:
      - uses: actions/checkout@v2
      - run: yarn install --frozen-lockfile --non-interactive
      - run: yarn build
        working-directory: sdk
      - run: yarn test
  test_with_redis:
    services:
      redis:
        image: redis:6-alpine
        ports:
          - 6379:6379
    name: Test with Redis
    runs-on: [self-hosted, linux, x64]
    container: node:14-slim
    env:
      REDIS_URL: redis://redis:6379
    steps:
      - uses: actions/checkout@v2
      - run: yarn install --frozen-lockfile --non-interactive
      - run: yarn build
        working-directory: sdk
      - run: yarn test
  lint:
    name: Lint
    runs-on: [self-hosted, linux, x64]
    container: node:14-slim
    steps:
      - uses: actions/checkout@v2
      - run: yarn install --frozen-lockfile --non-interactive
      - run: yarn build
        working-directory: sdk
      - run: yarn lint
  build_push_beta:
    name: Build and Push beta
    runs-on: [self-hosted, linux, x64]
    steps:
      - uses: actions/checkout@v2
      - uses: docker/setup-buildx-action@v1
      - uses: docker/login-action@v1
        with:
          registry: xxx
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
      - name: Build and push Docker images
        uses: docker/build-push-action@v2
        with:
          context: .
          tags: xxx/xx:${{ github.sha }}
          push: true
          build-args: |
            workspace=uh/schedule
  build_push_prod:
    name: Build and Push prod
    needs:
      - test
      - test_with_redis
      - lint
    runs-on: [self-hosted, linux, x64]
    if: startsWith(github.ref, 'refs/tags/') && endsWith(github.ref, 'v*' )
    steps:
      - uses: actions/checkout@v2
      - uses: actions/github-script@v3
        with:
          id: tag
          script: |
            return context.payload.ref.replace(/\/refs\/tags\//, '');
          result-encoding: string
      - uses: docker/setup-buildx-action@v1
      - uses: docker/login-action@v1
        with:
          registry: xxx
          username: ${{ secrets.DOCKER_USERNAME }}
          password: ${{ secrets.DOCKER_PASSWORD }}
      - name: Build and push Docker images
        uses: docker/build-push-action@v2
        with:
          tags: xxx/xx:${{ steps.tag.outputs.result }}
          push: true
          build-args: |
            workspace=uh/schedule

Logs

logs_101.zip

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
mmckanecommented, Aug 9, 2021

While adding driver: docker does fix the issue I would prefer retaining the ability to build using the docker-container driver which allows for caching. Has anyone looked at this this issue appears related: https://github.com/docker/buildx/issues/561 is there a way to manipulate the user ns flag with the buildx create command that I am missing?

2reactions
Frederik-Baetenscommented, Feb 10, 2021

adding driver: docker fixes this.

      - uses: docker/setup-buildx-action@v1
        with:
          driver: docker
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to solve error with rootless docker in github actions self ...
A solution for this is adding driver: docker to the setup-buildx action. - uses: docker/setup-buildx-action@v1 with: driver: docker.
Read more >
Run the Docker daemon as a non-root user (Rootless mode)
Rootless mode allows running the Docker daemon and containers as a non-root ... Error processing tar file(exit status 1): lchown <FILE>: invalid argument....
Read more >
docker buildx create - Docker Documentation
docker buildx create : Create makes a new builder instance pointing to a docker context or endpoint, where context is the name of...
Read more >
Docker Engine release notes
Fix ssh: parse error in message type 27 errors during docker build on hosts ... Fix an Invalid standard handle identifier panic when...
Read more >
OCI runtime create failed: container_linux.go:380: starting ...
I keep getting this error in a Docker container when I execute docker run. Dockerfile FROM python:3.9.7-slim-bullseye ENV PYTHONUNBUFFERED 1 ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found