devcontainers / devcontainers/spec

Should forwardPorts Automatically Apply To dockerComposeFIle & service?

Open
#245 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
5.7k
Forks
496
PR merge metrics
No merged PRs in 30d

Description

Most of my Dev Containers leverage `dockerComposeFile` since I work with larger applications like Rails. While trying to take advantage of Tailscale from another machine to my local, I found the following two issues.

- https://github.com/microsoft/vscode-remote-release/issues/1009
- https://github.com/tailscale/tailscale/issues/5813

The fix for me was easy, simply add a matching compose ports like so to my compose file and everything worked. This makes total sense to me but did want to ask the question on which top level configs should be applied to the main service. My guess is no to this but did want to ask.

```yaml
services:
app:
ports:
- 3000:3000
```

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.