Enable rootless Podman in gVisor
- Dominant language
- Go
- Stars
- 19.3k
- Forks
- 2k
- Avg merge
- 3d 5h
- Merged PRs (30d)
- 264
Description
### Description
Enable running rootless Podman inside a gVisor container.
There are a few blockers to this:
* Networking: Podman sets up for rootless networking using slirp4netns. Rootless networking is WIP in gVisor.
* Storage: fuseoverlayfs disconnect issue
* Networking: in-sandbox rootless networking issues
* virtual nested user namespaces
* virtual cgroup v2 hierarchy
Currently, rootless Podman will work inside a gVisor container if you use the host network and VFS storage driver.
## repro steps
Dockerfile:
```
FROM ubuntu:24.04
# Install Podman and rootless auxiliary utilities
RUN apt-get update && apt-get install -y \
podman \
uidmap \
slirp4netns \
fuse-overlayfs \
curl \
&& rm -rf /var/lib/apt/lists/*
# Configure default rootless registry helper
RUN mkdir -p /etc/containers && \
echo 'unqualified-search-registries = ["docker.io"]' > /etc/containers/registries.conf
# Create a non-root user (e.g., developer) inside the container
RUN useradd -m -s /bin/bash developer && \
echo "developer:100000:65536" >> /etc/subuid && \
echo "developer:100000:65536" >> /etc/subgid
USER developer
WORKDIR /home/developer
```
```
docker run --runtime gvisor-runsc -d --rm \
--cap-add all \
--device /dev/fuse \
--name gvisor-sandbox \
podman-in-gvisor sleep infinity
```
```
docker exec -it -u developer gvisor-sandbox bash
podman info
podman --storage-driver=vfs run --rm -it --network=host alpine echo "Hello from nested Podman!"
```
### Is this feature related to a specific bug?
_No response_
### Do you have a specific solution in mind?
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.