bottlerocket-os / bottlerocket-os/bottlerocket
buildkit's rootless mode doesn't work on Bottlerocket
- Dominant language
- Rust
- Stars
- 9.7k
- Forks
- 586
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
**Image I'm using:**
aws-k8s-1.21 1.6.0
**What I expected to happen:**
I deployed ["rootless" buildkit](https://github.com/moby/buildkit/blob/master/examples/kubernetes/statefulset.rootless.yaml) and then ran these steps after enabling user namespaces on the node.
```
kubectl exec -it statefulset/buildkitd -- /bin/sh
cd /tmp
cat <Dockerfile
FROM amazonlinux:2
RUN echo hi
EOF
buildctl --addr unix:///run/user/1000/buildkit/buildkitd.sock build --frontend=dockerfile.v0 --local context=. --local dockerfile=. --output type=image,name=test-image,push=false
```
I expected the build to work correctly.
**What actually happened:**
The build failed with an error like this:
```
failed to solve: failed to read dockerfile: failed to mount /home/user/.local/tmp/buildkit-mount313966645: [{Type:bind Source:/home/user/.local/share/buildkit/runc-native/snapshots/snapshots/1 Options:[rbind ro]}]: operation not permitted.
```
**How to reproduce the problem:**
See above.
Contributor guide
Assessment
This issue has not been assessed yet.