Skip to content

rootless: permission denied ([rootlesskit:child ] error: failed to share mount point: /: permission denied) #2441

Closed
@fgiannetti

Description

Hello all!
I am trying to execute rootless buildkit inside a Kubernetes container (using Argo workflow). I followed the doc instructions but i am getting the error:

could not connect to unix:///run/user/1000/buildkit/buildkitd.sock after 10 trials
========== log ==========
[rootlesskit:child ] error: failed to share mount point: /: permission denied
[rootlesskit:parent] error: child exited: exit status 1
sh: can't kill pid 8: No such process

The k8s nodes are using Ubuntu 18.04.4 LTS with Kernel 4.15.0-112-generic

I cant figure out what is the problem. Is there a external configuration that I am missing?

Here is the yaml that i am using:

apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: buildkit-test
spec:
entrypoint: image
templates:
- name: image
inputs:
artifacts:
- name: source
path: /workspace
git:
repo: git@github.com:myRepo.git
revision: 0.0.8
sshPrivateKeySecret:
name: github-creds
key: ssh-private-key
container:
image: moby/buildkit:master-rootless
workingDir: /workspace
env:
- name: BUILDKITD_FLAGS
value: --oci-worker-no-process-sandbox
command:
- buildctl-daemonless.sh
args:
- build
- --frontend
- dockerfile.v0
- --local
- context=.
- --local
- dockerfile=.
- --output
- type=image,name=hub.docker/myRepo:0.0.8-BK,push=true

Thanks very much!

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions