-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
mount whitelist of devices on insecure security mode #1351
Conversation
Signed-off-by: Tonis Tiigi <[email protected]>
Signed-off-by: Tonis Tiigi <[email protected]>
ffbe5b9
to
81fa647
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall changes LGTM. Will test it separately.
logrus.Debugf("failed to get next free loop device: %v", err) | ||
} | ||
|
||
for i := 0; i <= loopID+7; i++ { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there any specific reason for these 7 loop devices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Tonis Tiigi <[email protected]>
81fa647
to
8f52339
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could you document this list somewhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
@kunalkushwaha Did you test it? |
Tested. LGTM. |
fixes docker/buildx#220
Unlike
docker run --privileged
we don't mount all the devices from host because that would give inconsistent environments for different hosts that we would like to avoid (and later solve with constraints). But we can mount a whitelist of devices that are always created by regular distros and commonly used. Permissions are granted to users to read/write all the devices, for the missing ones you just need tomknod
the device yourself.Devices currently created with
--security=insecure
: