Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No touch /dev #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

shankerwangmiao
Copy link

Sometimes we need to create some dev nodes in advance (for example, i want to use tun device inside the container), but we don't want the container with the capability to create any dev nodes. The --no-dev option is used to tell the pflask not to touch my /dev

Here is an example usage:

pflask \
    --chroot=/path/to/fakeRoot \
    --chdir=/ \
    --mount=bind-ro:/lib:/lib \
    --mount=bind-ro:/lib64:/lib64 \
    --mount=bind-ro:/usr/local/lib:/usr/local/lib  \
    --mount=bind-ro:/usr/lib:/usr/lib \
    --mount=tmp:/tmp \
    --mount=tmp:/var/run \
    --mount=tmp:/dev/shm \
    --user-map=0:2000:65536 \
    --no-dev \
    /sbin/init

And I can use mount -t devpts -o newinstance lxcpts /dev/pts to create /dev/pts manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant