google / google/gvisor

OCI: Support `overlay` filesystem type

Open
#4,768 9 comments 1 reaction 0 assignees View on GitHub
area: container runtime area: integration status: help wanted type: enhancement
Dominant language
Go
Stars
19.3k
Forks
2k
Avg merge
3d 5h
Merged PRs (30d)
264

Description

Reported by Ron Braunstein:

I have an overlay mount in config.json that works for "runc", but not for "runsc"
```shell
$ grep -B2 -A7 overlay config.json
{
"destination": "/ov",
"type": "overlay",
"options": [
"lowerdir=/tmp/lower",
"upperdir=/tmp/upper",
"workdir=/tmp/work"
]
}
```
I'm expecting to have an "/ov" mount in the container that uses the host /tmp/lower and /tmp/upper directories.

=== Run the container with runsc ===
```shell
(base) ron@gamer:~/runsc/bundle$ sudo runsc run demo
bash: /root/.bashrc: Permission denied
root@runsc:/# mount
none on / type overlayfs (rw)
none on /dev/pts type devpts (rw)
none on /proc type proc (rw)
none on /dev type overlayfs (rw)
none on /sys type sysfs (ro,noexec)
none on /tmp type tmpfs (rw)

root@runsc:/# df -H /ov
Filesystem Size Used Avail Use% Mounted on
- 206G 198G 7.5G 97% /ov

root@runsc:/# touch /ov/hi
touch: cannot touch '/ov/hi': Permission denied

root@runsc:/# exit
exit
```

==== on the host ===
```shell
(base) ron@gamer:~/runsc/bundle$ ls -ltr /tmp/lower /tmp/upper /tmp/work
/tmp/upper:
total 0

/tmp/lower:
total 4
-rw-rw-r-- 1 ron ron 3 Nov 5 20:46 file2

/tmp/work:
total 4
d--------- 2 root root 4096 Nov 5 21:14 work
```

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.