Skip to content

docs/rootless.md: update#40076

Merged
justincormack merged 1 commit intomoby:masterfrom
AkihiroSuda:update-rootless-docs
Oct 17, 2019
Merged

docs/rootless.md: update#40076
justincormack merged 1 commit intomoby:masterfrom
AkihiroSuda:update-rootless-docs

Conversation

@AkihiroSuda
Copy link
Member

@AkihiroSuda AkihiroSuda commented Oct 12, 2019

  • how to enable overlayfs for Debian
  • how to expose privileged ports
  • how to install
  • how to run rootless dind
  • update description for RHEL/CentOS 7

@derek derek bot added the invalid label Oct 12, 2019
@derek
Copy link

derek bot commented Oct 12, 2019

Thank you for your contribution. I've just checked and your Pull Request doesn't appear to have any description.
That's something we need before your Pull Request can be merged. Please see our contributing guide.

@AkihiroSuda AkihiroSuda force-pushed the update-rootless-docs branch 2 times, most recently from 5e61514 to 8100969 Compare October 12, 2019 19:01
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Left some suggestions/questions, but overall looks good

@thaJeztah
Copy link
Member

@AkihiroSuda do any of these changes require current "master"? Or should I cherry-pick this into the 19.03 release branch?

@AkihiroSuda
Copy link
Member Author

@AkihiroSuda do any of these changes require current "master"? Or should I cherry-pick this into the 19.03 release branch?

thanks, it would be better probably

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! This reads much better!

LGTM

docs/rootless.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! This reminds me; I know people ran into problems running docker on Fedora 31; perhaps we should add this to the docs and release notes 👍 I'll have a look at creating PR's for that

docs/rootless.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we update the dockerd-rootless.sh script to always add --experimental ? (if needed, we can make it print some warnings that rootless is still experimental)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we intentionally omitted that for keeping the script simple.
Users don't need to care in most cases, because the installer script creates the systemd unit file with --experimental

docs/rootless.md Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤔 we could create a script that directly calls the API, and disables mount masks.

Could actually be a CLI plugin 🤔🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we already have --security-opt systempaths=unconfined, but seems not enough

$ docker run --rm --security-opt seccomp=unconfined --security-opt apparmor=unconfined --security-opt systempataths=unconfined --cap-add all docker:19.03.3-dind-rootless --experimental
...
mount: permission denied (are you root?)
time="2019-10-13T11:15:55Z" level=warning msg="failed to mount sysfs ([[mount -t sysfs none /sys]]), falling back to read-only mount ([[mount -t sysfs -o ro none /sys]]): exit status 1"
open: No such file or directory
[rootlesskit:child ] error: executing [[ip tuntap add name tap0 mode tap] [ip link set tap0 address 02:50:00:00:00:01]]: exit status 1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting 🤔

Signed-off-by: Akihiro Suda <[email protected]>
Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM looks even better now 👌👍

@AkihiroSuda
Copy link
Member Author

@tonistiigi @tiborvass @tianon PTAL?


```console
$ sudo sh -c "echo 0 2147483647 > /proc/sys/net/ipv4/ping_group_range"
$ sudo setcap cap_net_bind_service=ep $HOME/bin/rootlesskit
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

setcap may not installed on all systems per default. You can do this conditionally by something like:

sudo if command -v setcap > /dev/null && sudo setcap cap_net_bind_service=ep $HOME/bin/rootlesskit

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anyway ... if the rootlesskit gets redeployed, the capabilities needs to be also set again. So using sysctl is the permanent way, but also less secure.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants