[docker-in-docker] `docker-init.sh` prints `grep: /proc/modules: No such file or directory` on kernels without loadable-module support
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 88/100
Research direction
The check is in src/docker-in-docker/install.sh; read the iptablesSwitchAtRuntime backend selection described in the issue. Reproduce on a kernel without loadable-module support and confirm startup prints the missing /proc/modules error. Done when that error is silenced and the fallback to iptables-nft still works.
Written by the indexing model from the issue text.
Description
With iptablesSwitchAtRuntime at its default of true, docker-init.sh prints an error on every start when the kernel is built without loadable-module support, because /proc/modules doesn't exist there.
The check is in src/docker-in-docker/install.sh:
if type iptables-legacy > /dev/null 2>&1 \
&& { grep -qE '^(ip_tables)\b' /proc/modules \
|| [ -d /sys/module/ip_tables ]; } \
grep -q doesn't suppress the error for a missing file, so the message goes to stderr:
grep: /proc/modules: No such file or directory
The backend selection still works: the grep fails, the /sys/module check runs next, and the script falls through to iptables-nft.
So this is only noise, but it looks like a failure to anyone reading container startup output.
Reproduction: feature version 4.1.3, in a microsandbox (msb 0.7.13) guest on kernel 6.12.113, built without loadable modules.
Any container or VM on such a kernel should behave the same.
Suggested fix: silence that one grep, leaving the rest of the logic as it is:
&& { grep -qE '^(ip_tables)\b' /proc/modules 2>/dev/null \
Related: #1709 concerns the same iptablesSwitchAtRuntime check.
- Dominant language
- Shell
- Stars
- 1.6k
- Forks
- 626
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 7
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from devcontainers/features
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
devcontainers/features#1776 · 1 comment ·
Maintainers usually reply within 3 days
-
replica-skillOpen
Difficulty 4/5 3-5 days Newbie friendliness 5/100
devcontainers/features#1775 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
devcontainers/features#1774 ·
Maintainers usually reply within 3 days
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
devcontainers/features#1772 ·
Maintainers usually reply within 3 days
-
go feature: "init:true" prevents any further use cases that require "init:false", such as running systemd as PID1Possibly taken @v-Kaniska244 claimed this 10 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 55/100
devcontainers/features#1765 · 1 assignee ·
Maintainers usually reply within 3 days
All issues in devcontainers/features
Similar issues
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
-
area:claude-code-web bug has repro platform:linux platform:web
Difficulty 1/5 Under an hour Newbie friendliness 66/100
anthropics/claude-code#110168 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
btclib-org/portanode#968 · 1 comment ·
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
agents area: runtime automation chore cli consistency dependencies developer-experience difficulty: easy documentation enhancement good first issue help wanted hygiene json-output priority: P3 starters tests
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
flisk-sh/flisk-example#41 ·
Maintainers usually reply within 1 day