devcontainers / devcontainers/cli

forwardPorts configuration option not working

オープン
#186 コメント 10 件 リアクション 22 件 担当者 0 名 GitHub で見る
feature-request
主要言語
TypeScript
スター
3k
フォーク
457
平均マージ
13時間 17分
マージ済み PR(30日)
6

説明

With the recent release (the one with features) I tried experimenting with the devcontainers CLI. But I just can't get the `forwardPorts` feature to work. I created the following minimal `devcontainer.json` file:
```
{
"name": "my-project-devcontainer",
"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
"features": {
"ghcr.io/devcontainers/features/sshd:1": {
"version": "latest"
}
},
"forwardPorts": [2222],
"remoteUser": "vscode"
}
```

Maybe I am misunderstanding the `forwardPorts` option, but I would expect that this configuration will forward the port 2222 (this is the default defined by the sshd feature) from the devcontainer to my host. But a simple `ssh localhost -p 2222` did not work.

I tried this on Windows 11.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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