google / google/gvisor

gvisor build in rootless docker

Open
#12,844 3 comments 1 reaction 0 assignees View on GitHub
type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

### Description

Don't think this ever worked hence reporting as a feature request. It's a bit of both really.

Anyway: I run docker rootless and it's major pain getting gvisor to build.

### Is this feature related to a specific bug?

_No response_

### Do you have a specific solution in mind?

I managed to get it working by commenting out https://github.com/google/gvisor/blob/1ea26f133476461497b359f602fc3cd8977b5a05/tools/bazel.mk#L308 and running `make` with a bunch of extra flags:

```
make copy TARGETS=runsc DESTINATION=/tmp \
USER=root \
DOCKER_PRIVILEGED= \
BAZEL_CACHE_USE_VOLUME=true \
BAZEL_CACHE=/root/.cache/bazel
```

and then I still had to `docker exec -it gvisor-bazel-6d5dbb77-x86_64 /bin/bash` and manually fish the `runsc` binary out of `bazel-bin/…` because it didn't get copied to /tmp despite it being mounted.

Would be nice to make this work out of the box, or at least document this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.