opencontainers / opencontainers/runc

Support for arbitrary bind mount directories on read-only FS for rootless containers

Open
#1,671 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13.5k
Forks
2.3k
Avg merge
2d 8h
Merged PRs (30d)
30

Description

Following the idea outlined here:
https://github.com/singularityware/singularity/issues/1207#issuecomment-350137374
it would be possible to allow for arbitrary bind mount points (i.e. also for directories not existing in the container yet, and while keeping it read-only).

To summarize, the idea would be:

  1. Recreate the top-level directory structure of the container in a scratch-directory, for example a subdirectory of the --root directory.
  2. Create the additional, not yet existing directories which are meant to be used as additional bind mounts.
  3. Bind-mount all directories over one-by-one.
  4. chroot to that directory and remount read-only to not have the user have permissions on /.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked issue comment, then trace runc's rootless container setup and bind-mount handling. Done means arbitrary bind targets can be created for read-only rootless containers without modifying the container filesystem or granting the user permissions on /.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
operating-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.