microsoft / microsoft/vscode-remote-release

Using forwardPorts gives no indication that a different port was used

Open
#2,249 5 comments 0 reactions 1 assignee View on GitHub

@chrmarti is already working on this.

Since Jan 29, 2020.

containers under-discussion
Dominant language
Dockerfile
Stars
4.2k
Forks
470
Avg merge
1d 1h
Merged PRs (30d)
1

Description

I hit a problem where I had port 3000 running locally, and then opened a dev container with "forwardPorts": [3000]. Since the port conflicted, the port was actually mapped to 3001 locally. However, I had no idea, and couldn't figure out why updates weren't taking effect. I finally realized what was going on.

This doesn't happen with appPort because it actually errors if the port is already in use.

Repro:

  1. Spin up something on port 3000 locally (like another docker container)
  2. Create a devcontainer.json that points to "forwardPorts": [3000].

Expected: Notified that a different local port was used, or it errors
Actual: No notice, no error

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.