devcontainers / devcontainers/features

`docker-from-docker`: processes inside the container can't access ports forwarded from the docker bridge network

Offen
#171 3 Kommentare 1 Reaktion 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
Shell
Sterne
1.5k
Forks
621
Ø Merge
6 T. 53 Min.
Gemergte PRs (30 T.)
9

Beschreibung

When running `docker-from-docker`, if a container maps a port to the bridge network, I'd expect to be able to open another terminal and hit that port. Instead, the port is exposed outside of the dev container, but remains inaccessible _inside_ of it, which breaks development setups that mix dockerized and non-dockerized services. Here's a [minimal reproduction](https://github.com/davidwallacejackson/devcontainer-port-repro).

I saw this bug using:

Host: macOS 12.3.1
Visual Studio Code: 1.71.2
Docker Host: Desktop 4.12.0, Engine 20.10.17
Remote Containers Extension: v0.252.0

Port forwarding works as expected both inside and outside of the container when using `docker-in-docker` instead of `docker-from-docker`.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der verlinkten minimalen Reproduktion und reproduziere den Fehler mithilfe des docker-from-docker-Features unter den aufgeführten Docker- und devcontainer-Versionen. Vergleiche dessen Portverhalten mit docker-in-docker und verfolge anschließend die Netzwerkeinrichtung des Features. Als erledigt gilt die Aufgabe, wenn ein auf das bridge network gemappter Port sowohl von einem anderen Prozess innerhalb des dev containers als auch von außerhalb erreichbar ist.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
docker
Bereich
devops, networking
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.