You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docker-troubleshooting/arp-flux-sysctls.md
+21-1Lines changed: 21 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,9 @@ The running environment does not provide the expected kernel sysctl values. This
21
21
22
22
## How to Correct the Issue
23
23
24
-
Set these sysctls at container runtime.
24
+
### Option A: Via Docker (Standard Bridge Networking or `network_mode: host` with `NET_ADMIN`)
25
+
26
+
If you are using standard bridged networking, or `network_mode: host` and the container is granted the `NET_ADMIN` capability (as is the default recommendation), set these sysctls at container runtime.
25
27
26
28
- In `docker-compose.yml` (preferred):
27
29
```yaml
@@ -44,6 +46,24 @@ Set these sysctls at container runtime.
44
46
> - Use `--privileged` with `docker run`.
45
47
> - Use the more restrictive `--cap-add=NET_ADMIN` (or `cap_add: [NET_ADMIN]` in `docker-compose` service definitions) to allow the sysctls to be applied at runtime.
46
48
49
+
### Option B: Via Host OS (Fallback for `network_mode: host`)
50
+
51
+
If you are running the container with `network_mode: host` and cannot grant the `NET_ADMIN` capability, or if your container runtime environment explicitly blocks sysctl overrides, applying these settings via the container configuration will fail. Attempting to do so without sufficient privileges typically results in an OCI runtime error: `sysctl "net.ipv4.conf.all.arp_announce" not allowed in host network namespace`.
52
+
53
+
In this scenario, you must apply the settings directly on your host operating system:
54
+
55
+
1. **Remove** the `sysctls` section from your `docker-compose.yml`.
56
+
2. **Apply** on the host immediately:
57
+
```bash
58
+
sudo sysctl -w net.ipv4.conf.all.arp_ignore=1
59
+
sudo sysctl -w net.ipv4.conf.all.arp_announce=2
60
+
```
61
+
3. **Make persistent** by adding the following lines to `/etc/sysctl.conf` on the host:
0 commit comments