opencontainers / opencontainers/runc
How to create a container with the same root fs as the host?
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 13.5k
- Forks
- 2.3k
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 30
Description
Hello,
I'm trying to create a container that runs in its own namespaces (mount, net, uts, etc.). But the special thing I want to achieve is that it has the same view on the filesystem as the root, unless it tries to modify its own VFS.
For that I try to specify path to rootfs as "/", but the creation of the container does not work this way and fails with "invalid argument":
sudo ./test-runc hostname
2018/10/13 10:34:34 exec: "hostname": executable file not found in $PATH
2018/10/13 12:34:34 Failed to launch the container: container_linux.go:336: starting container process caused "exec: "hostname": executable file not found in $PATH"
Here is the full example I tried to run: test-runc
I still want to run the container in a separate mount namespace. For example, to be able to remount /proc, but I still want the rest of the host VFS be visible from the inside of the container.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the linked test-runc example and the runc behavior around a rootfs path of "/", then run the shown hostname command to reproduce the failure. Done would mean a container can use separate namespaces while retaining the host filesystem view and still support remounting /proc, as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, linux
- Domain
- cli, operating-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100