Skip to content
This repository has been archived by the owner on Oct 13, 2023. It is now read-only.

Commit

Permalink
Merge pull request #397 from thaJeztah/19.03_backport_slirp4netns_san…
Browse files Browse the repository at this point in the history
…dbox

[19.03 backport] rootless: harden slirp4netns with mount namespace and seccomp
  • Loading branch information
andrewhsu authored Oct 28, 2019
2 parents 645f559 + 5bd4233 commit d91a85a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions contrib/dockerd-rootless.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ fi

: "${DOCKERD_ROOTLESS_ROOTLESSKIT_NET:=}"
: "${DOCKERD_ROOTLESS_ROOTLESSKIT_MTU:=}"
# if slirp4netns v0.4.0+ is installed, slirp4netns is hardened using sandbox (mount namespace) and seccomp
: "${DOCKERD_ROOTLESS_ROOTLESSKIT_SLIRP4NETNS_SANDBOX:=auto}"
: "${DOCKERD_ROOTLESS_ROOTLESSKIT_SLIRP4NETNS_SECCOMP:=auto}"
net=$DOCKERD_ROOTLESS_ROOTLESSKIT_NET
mtu=$DOCKERD_ROOTLESS_ROOTLESSKIT_MTU
if [ -z $net ]; then
Expand Down Expand Up @@ -77,6 +80,8 @@ if [ -z $_DOCKERD_ROOTLESS_CHILD ]; then
# * /run: copy-up is required so that we can create /run/docker (hardcoded for plugins) in our namespace
exec $rootlesskit \
--net=$net --mtu=$mtu \
--slirp4netns-sandbox=$DOCKERD_ROOTLESS_ROOTLESSKIT_SLIRP4NETNS_SANDBOX \
--slirp4netns-seccomp=$DOCKERD_ROOTLESS_ROOTLESSKIT_SLIRP4NETNS_SECCOMP \
--disable-host-loopback --port-driver=builtin \
--copy-up=/etc --copy-up=/run \
$DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS \
Expand Down
4 changes: 2 additions & 2 deletions hack/dockerfile/install/rootlesskit.installer
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# v0.6.0
ROOTLESSKIT_COMMIT=2fcff6ceae968a1d895e6205e5154b107247356f
# v0.7.0
ROOTLESSKIT_COMMIT=791ac8cb209a107505cd1ca5ddf23a49913e176c

install_rootlesskit() {
case "$1" in
Expand Down

0 comments on commit d91a85a

Please sign in to comment.