rootless: allow exposing dockerd TCP socket easily#39493
rootless: allow exposing dockerd TCP socket easily#39493tiborvass merged 1 commit intomoby:masterfrom
Conversation
eg. $ DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="-p 0.0.0.0:2376:2376/tcp" \ dockerd-rootless.sh --experimental \ -H tcp://0.0.0.0:2376 \ --tlsverify --tlscacert=ca.pem --tlscert=cert.pem --tlskey=key.pem This commit bumps up RootlessKit from v0.4.1 to v0.6.0: rootless-containers/rootlesskit@27a0c7a...2fcff6c Signed-off-by: Akihiro Suda <[email protected]>
cea050b to
34f4729
Compare
Usage: $ docker built -t dind-rootless . $ docker run -d --name dind-rootless --privileged dind-rootless $ docker exec dind-rootless docker info * The daemon runs in an unprivileged user with ID 1000 * `--privileged` is still required due to seccomp, apparmor, procfs, and sysfs stuff * `-H tcp://....` will be supported soon: moby/moby#39493 Signed-off-by: Akihiro Suda <[email protected]>
Usage: $ docker build -t dind-rootless . $ docker run -d --name dind-rootless --privileged dind-rootless $ docker exec dind-rootless docker info * The daemon runs in an unprivileged user with ID 1000 * `--privileged` is still required due to seccomp, apparmor, procfs, and sysfs stuff * `-H tcp://....` will be supported soon: moby/moby#39493 Signed-off-by: Akihiro Suda <[email protected]>
Usage: $ docker build -t dind-rootless . $ docker run -d --name dind-rootless --privileged dind-rootless $ docker exec dind-rootless docker info * The daemon runs in an unprivileged user with ID 1000 * `--privileged` is still required due to seccomp, apparmor, procfs, and sysfs stuff * `-H tcp://....` will be supported soon: moby/moby#39493 Signed-off-by: Akihiro Suda <[email protected]>
Usage: $ docker build -t dind-rootless . $ docker run -d --name dind-rootless --privileged dind-rootless $ docker exec dind-rootless docker info * The daemon runs in an unprivileged user with ID 1000 * `--privileged` is still required due to seccomp, apparmor, procfs, and sysfs stuff * `-H tcp://....` will be supported soon: moby/moby#39493 Signed-off-by: Akihiro Suda <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #39493 +/- ##
=========================================
Coverage ? 37.32%
=========================================
Files ? 609
Lines ? 45224
Branches ? 0
=========================================
Hits ? 16881
Misses ? 26056
Partials ? 2287 |
|
ping @tonistiigi @tiborvass PTAL |
|
@tonistiigi @tiborvass PTAL? |
|
I asked @tiborvass to review Yesterday; I think he was testing this. |
| To expose the Docker API socket via TCP, you need to launch `dockerd-rootless.sh` with `DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="-p 0.0.0.0:2376:2376/tcp"`. | ||
|
|
||
| ```console | ||
| $ DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS="-p 0.0.0.0:2376:2376/tcp" \ |
There was a problem hiding this comment.
@AkihiroSuda ok I finally got around testing this and it works, but for usability, I think it would be better to set a smarter default for DOCKERD_ROOTLESS_ROOTLESSKIT_FLAGS based on what's in -H or maybe that's too smart? (It would have to grep for tcp:// in -H --host flags and DOCKER_HOST envvar).
There was a problem hiding this comment.
It would need to grep daemon.json as well, so too complex for shell script :P
tiborvass
left a comment
There was a problem hiding this comment.
Had a small comment but no need to block this PR for that.
|
cherry-picked as docker-archive#300 |
Signed-off-by: Akihiro Suda [email protected]
- What I did
allow exposing dockerd TCP socket easily in rootless mode
- How I did it
By bumping up RootlessKit from v0.4.1 to v0.6.0:
rootless-containers/rootlesskit@27a0c7a...2fcff6c
- How to verify it
- Description for the changelog
rootless: allow exposing dockerd TCP socket easily
- A picture of a cute animal (not mandatory but encouraged)

https://pixabay.com/photos/animal-avian-bird-cold-nature-1867125/