Universal image: containers on a user-defined bridge network cannot reach each other

クローズ
#2,033 コメント 3 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@v-Kaniska244 がすでに取り組んでいます。

2026年10月5日 から。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, docker-compose, shell

調査の方向性

Start by reproducing the failure with the supplied Docker Compose example in a fresh universal Codespace, then inspect the universal image setup associated with version 6.1.7 and its Docker networking initialization. Compare nftables and iptables-legacy state before and after startup; done means containers on user-defined bridge networks can communicate without applying the listed workaround.

索引モデルが issue の本文から書いたものです。

説明

Summary

In a GitHub Codespace using the default universal image (no devcontainer.json), containers on a user-defined bridge network (e.g. the default network created by docker compose) cannot reach each other. The same compose file works on a regular Docker host.

Environment

Steps to reproduce

  1. Create a fresh Codespace with no devcontainer.json (example: https://github.com/mdmourao/docker-api-solved)
  2. Start any two services with docker compose up (e.g. postgres:17 + an app)
  3. From another container on the same network:
   docker run --rm --network <project>_default postgres:17 pg_isready -h db -p 5432

Expected: db:5432 - accepting connections
Actual: db:5432 - no response

Workaround

sudo iptables-legacy -P FORWARD ACCEPT

or, more narrowly:

sudo iptables-legacy -I FORWARD -i br+ -o br+ -j ACCEPT

References

Same diagnosis reported in other projects, worked around locally and closed there, but apparently never reported upstream:

主要言語
Shell
スター
2.1k
フォーク
976
平均マージ
2日 21時間
マージ済み PR(30日)
16

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/images のほかの issue

devcontainers/images の issue をすべて見る

似ている issue

Shell/Bash の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。