Skip to content

Commit 3bed16a

Browse files
committed
engine/security/rootless: update for Docker Engine v29.5
See: - docker/docker PR 47103 - docker/docker PR 52319 Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
1 parent bfc2bfb commit 3bed16a

File tree

1 file changed

+54
-17
lines changed

1 file changed

+54
-17
lines changed

content/manuals/engine/security/rootless/troubleshoot.md

Lines changed: 54 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,15 @@ weight: 30
7777
- Exposing SCTP ports
7878
- To use the `ping` command, see [Routing ping packets](./tips.md#routing-ping-packets).
7979
- To expose privileged TCP/UDP ports (< 1024), see [Exposing privileged ports](./tips.md#exposing-privileged-ports).
80+
- NFS mounts as the docker "data-root" is not supported. This limitation is not specific to rootless mode.
81+
82+
### Historical limitations
83+
84+
#### Until Docker Engine v29.5
85+
8086
- `IPAddress` shown in `docker inspect` is namespaced inside RootlessKit's network namespace.
8187
This means the IP address is not reachable from the host without `nsenter`-ing into the network namespace.
8288
- Host network (`docker run --net=host`) is also namespaced inside RootlessKit.
83-
- NFS mounts as the docker "data-root" is not supported. This limitation is not specific to rootless mode.
8489

8590
## Troubleshooting
8691

@@ -223,14 +228,18 @@ of network and port driver you use. If you're experiencing unexpected behavior
223228
or performance related to networking, review the following table which shows
224229
the configurations supported by RootlessKit, and how they compare:
225230

226-
| Network driver | Port driver | Net throughput | Port throughput | Source IP propagation | No SUID | Note |
227-
| -------------- | -------------- | -------------- | --------------- | --------------------- | ------- | ---------------------------------------------------------------------------- |
228-
| `slirp4netns` | `builtin` | Slow | Fast ✅ ||| Default in a typical setup |
229-
| `vpnkit` | `builtin` | Slow | Fast ✅ ||| Default when `slirp4netns` isn't installed |
230-
| `slirp4netns` | `slirp4netns` | Slow | Slow ||| |
231-
| `pasta` | `implicit` | Slow | Fast ✅ ||| Experimental; Needs pasta version 2023_12_04 or later |
232-
| `lxc-user-nic` | `builtin` | Fast ✅ | Fast ✅ ||| Experimental |
233-
| `bypass4netns` | `bypass4netns` | Fast ✅ | Fast ✅ ||| **Note:** Not integrated to RootlessKit as it needs a custom seccomp profile |
231+
| Network driver | Port driver | Net throughput | Port throughput | Source IP propagation | No SUID | Note |
232+
| -------------- | -------------------- | -------------- | --------------- | --------------------- | ------- | ---------------------------------------------------------------------------- |
233+
| `gvisor-tap-vsock`| `builtin` | Slow | Fast ✅ | ✅ (*) || Default when slirp4netns is not installed |
234+
| `slirp4netns` | `builtin` | Slow | Fast ✅ | ✅ (*) || Default when slirp4netns is installed |
235+
| `vpnkit` | `builtin` | Slow | Fast ✅ | ✅ (*) || Legacy |
236+
| `gvisor-tap-vsock`| `gvisor-tap-vsock`| Slow | Slow ||| Not recommended. Use `builtin` port driver instead. |
237+
| `slirp4netns` | `slirp4netns` | Slow | Slow ||| |
238+
| `pasta` | `implicit` | Slow | Fast ✅ ||| Experimental; Needs pasta version 2023_12_04 or later |
239+
| `lxc-user-nic` | `builtin` | Fast ✅ | Fast ✅ | ✅ (*) || Experimental |
240+
| `bypass4netns` | `bypass4netns` | Fast ✅ | Fast ✅ ||| **Note:** Not integrated to RootlessKit as it needs a custom seccomp profile |
241+
242+
(*) Applicable since RootlessKit v3.0. Also requires `userland-proxy` to be disabled.
234243

235244
For information about troubleshooting specific networking issues, see:
236245

@@ -271,13 +280,13 @@ For details, see [Routing ping packets](./tips.md#routing-ping-packets).
271280

272281
#### `IPAddress` shown in `docker inspect` is unreachable
273282

274-
This is an expected behavior, as the daemon is namespaced inside RootlessKit's
275-
network namespace. Use `docker run -p` instead.
283+
This was an expected behavior until Docker Engine v29.5, as the daemon was namespaced inside RootlessKit's
284+
network namespace. Use `docker run -p` instead, or upgrade to Docker Engine v29.5 or later.
276285

277286
#### `--net=host` doesn't listen ports on the host network namespace
278287

279-
This is an expected behavior, as the daemon is namespaced inside RootlessKit's
280-
network namespace. Use `docker run -p` instead.
288+
This was an expected behavior until Docker Engine v29.5, as the daemon was namespaced inside RootlessKit's
289+
network namespace. Use `docker run -p` instead, or upgrade to Docker Engine v29.5 or later.
281290

282291
#### Network is slow
283292

@@ -304,8 +313,34 @@ $ systemctl --user restart docker
304313

305314
#### `docker run -p` does not propagate source IP addresses
306315

307-
This is because Docker in rootless mode uses RootlessKit's `builtin` port
308-
driver by default, which doesn't support source IP propagation. To enable
316+
{{< tabs >}}
317+
{{< tab name="RootlessKit v3.0 or later" >}}
318+
This is because Docker Engine's `userland-proxy` is incompatible with RootlessKit's source IP propagation.
319+
320+
To disable userland-proxy, add the following configuration to `~/.config/docker/daemon.json`:
321+
322+
```json
323+
{"userland-proxy": false}
324+
```
325+
326+
Then restart the daemon:
327+
328+
```bash
329+
systemctl --user restart docker
330+
```
331+
332+
You may also need to load `br_netfilter` kernel module:
333+
334+
```bash
335+
sudo tee /etc/modules-load.d/docker.conf <<EOF >/dev/null
336+
br_netfilter
337+
EOF
338+
339+
sudo systemctl restart systemd-modules-load.service
340+
```
341+
{{< /tab >}}
342+
{{< tab name="Prior versions" >}}
343+
This is because RootlessKit's `builtin` port didn't support source IP propagation until v3.0. To enable
309344
source IP propagation, you can:
310345

311346
- Use the `slirp4netns` RootlessKit port driver
@@ -342,11 +377,13 @@ To change the RootlessKit networking configuration:
342377
$ systemctl --user daemon-reload
343378
$ systemctl --user restart docker
344379
```
380+
{{< /tab >}}
381+
{{< /tabs >}}
345382

346383
For more information about networking options for RootlessKit, see:
347384

348-
- [Network drivers](https://github.com/rootless-containers/rootlesskit/blob/v2.0.0/docs/network.md)
349-
- [Port drivers](https://github.com/rootless-containers/rootlesskit/blob/v2.0.0/docs/port.md)
385+
- [Network drivers](https://github.com/rootless-containers/rootlesskit/blob/v3.0.0-beta.1/docs/network.md)
386+
- [Port drivers](https://github.com/rootless-containers/rootlesskit/blob/v3.0.0-beta.1/docs/port.md)
350387

351388
### Tips for debugging
352389

0 commit comments

Comments
 (0)