Skip to content

Silence missing /proc/modules errors in docker-in-docker - #1779

Open
Kaniska (v-Kaniska244) wants to merge 5 commits into
mainfrom
copilot/docker-in-docker-fix-grep-error
Open

Kaniska (v-Kaniska244) wants to merge 5 commits into
mainfrom
copilot/docker-in-docker-fix-grep-error

Conversation

@v-Kaniska244

@v-Kaniska244 Kaniska (v-Kaniska244) commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Suppress the misleading grep: /proc/modules: No such file or directory diagnostic emitted by docker-init.sh on kernels without loadable-module support. The existing iptables backend-selection fallback remains unchanged.

Changes

  • Redirect stderr to /dev/null for the /proc/modules probe used during runtime iptables selection.
  • Add regression coverage verifying that the generated init script contains the quiet probe.
  • Update the non-root runtime test to verify that the iptables alternative is configured and functional, rather than requiring the legacy backend specifically.
    This accommodates GitHub-hosted Ubuntu 26.04 runners, where iptables-nft is the default.
  • Bump the docker-in-docker feature patch version from 4.1.3 to 4.1.4.

Validation

The tests verify that the init script is generated, the runtime iptables selection block is present, the selected alternative is configured, and iptables -L succeeds.

Fixes #1770

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
@v-Kaniska244 Kaniska (v-Kaniska244) changed the title [WIP] Fix grep error for missing /proc/modules in docker-init.sh Silence missing /proc/modules errors in docker-in-docker Nov 23, 2026
@v-Kaniska244
Kaniska (v-Kaniska244) requested a balanced review from Copilot November 23, 2026 06:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues are reported for the change to suppress the misleading Docker-in-Docker startup diagnostic.

No open issues 🎉

What changed in this PR

This PR addresses #1770 by suppressing the misleading missing /proc/modules diagnostic during Docker-in-Docker startup, without changing iptables backend selection.

Changes:

  • Redirect the runtime module probe’s stderr to /dev/null.
  • Add a regression assertion that the generated init script contains the quiet probe.
  • Bump the feature patch version from 4.1.3 to 4.1.4.
File Description
test/​docker-in-docker/​docker_iptables_switch_at_runtime.sh Assert the generated script includes stderr suppression.
src/​docker-in-docker/​install.sh Silence the module probe while preserving fallback logic.
src/​docker-in-docker/​devcontainer-feature.json Bump the feature version to 4.1.4.

Review effort: Balanced

@v-Kaniska244
Kaniska (v-Kaniska244) marked this pull request as ready for review November 23, 2026 14:28
@v-Kaniska244
Kaniska (v-Kaniska244) requested a review from a team as a code owner November 23, 2026 14:28

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[docker-in-docker] docker-init.sh prints grep: /proc/modules: No such file or directory on kernels without loadable-module support

3 participants