devcontainers / devcontainers/features

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

Open
#171 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
Shell
Stars
1.5k
Forks
621
Avg merge
2d 11h
Merged PRs (30d)
4

Description

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`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.