Buildah login to Docker Hub fails on the shared GitLab runner with “Operation not permitted” during user namespace unshare, indicating the runner environment lacks required privileges/capabilities for Buildah.

  1. CI platform: GitLab CI (shared runner)
  2. Command attempted:
    • - echo "$DOCKER_PASSWORD" | buildah login -u "$DOCKER_USERNAME

      " --password-stdin $DOCKER_REGISTRY

  3. Variables:
    • DOCKER_USERNAME=pranav446
    • DOCKER_PASSWORD=********
    • DOCKER_REGISTRY=docker.io
  4. Image/tooling:
    • buildah (e.g., quay.io/containers/buildah:latest)

Error output

  1. Console:
    • Error during unshare(CLONE_NEWUSER): Operation not permitted
  2. Logs:
    • time="2025-11-05T10:27:05Z" level=error msg="parsing PID "": strconv.Atoi: parsing "": invalid syntax"
    • time="2025-11-05T10:27:05Z" level=error msg="(Unable to determine exit status)"

Expected behavior

  1. Buildah should authenticate to Docker Hub using credentials provided via stdin and proceed with subsequent build/push steps.

Actual behavior

  1. The login step fails immediately due to inability to perform user namespace unshare in the runner environment.