Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`runArgs` in Dev Containers image isn't shared to `.devcontainers.json` workspace

オープン
#857 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
docker, typescript
領域
devops, tooling

調査の方向性

この issue では custom-image と workspace devcontainer.json の構成が挙げられていますが、ソースファイルはありません。まず、workspace がイメージを使用する場合に runArgs がどのように読み取られ、結合されるかを追跡し、次に Docker inspect の PidMode と NetworkMode の結果を比較してください。custom-image から提供された runArgs が、それらを繰り返し指定しなくても利用側の workspace で反映されれば完了です。

索引モデルが issue の本文から書いたものです。

説明

feature-request

Hi, I tried to use runArgs in Dev Containers custom image but this field isn't shared to .devcontainers.json workspace

  • Logs :
  1. when runArgs is set in Dev Containers custom image :
$ docker inspect f | grep PidMode
            "PidMode": "",    # pid isn't set to host
$ docker inspect f | grep NetworkMode
            "NetworkMode": "bridge",    # network isn't set to host
  1. when runArgs is set in Dev Containers workspace that use the custom image :
$ docker inspect f | grep PidMode
            "PidMode": "host",    # pid is set to host

$ docker inspect f | grep NetworkMode
            "NetworkMode": "host",    # network is set to host

Steps to Reproduce :

  1. when runArgs is set in Dev Containers custom image :
// custom image configuration
{
	"name": "Custom image",
	"build": {
		"dockerfile": "Dockerfile",
		"args": {
			"devcontainercli": "true"
		}
	},
	"runArgs": [
		"--network=host",
		"--pid=host"
	],
	"capAdd": ["ALL"],
	"securityOpt": ["seccomp=unconfined"],
	"privileged": true,
        [...]
}

// devcontainer.json workspace configuration
{
	"name": "Dev Containers demo",
	"image": "registry.example.com/example/custom-image:version",
	[...]
}
  1. when runArgs is set in Dev Containers workspace that use the custom image :
// custom image configuration
{
	"name": "Custom image",
	"build": {
		"dockerfile": "Dockerfile",
		"args": {
			"devcontainercli": "true"
		}
	},
	"capAdd": ["ALL"],
	"securityOpt": ["seccomp=unconfined"],
	"privileged": true,
        [...]
}

// devcontainer.json workspace configuration
{
	"name": "Dev Containers demo",
	"image": "registry.example.com/example/custom-image:version",
	"runArgs": [
		"--network=host",
		"--pid=host"
	],
	[...]
}

Thank you !

主要言語
TypeScript
スター
3k
フォーク
461
平均マージ
18分
マージ済み PR(30日)
5

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

devcontainers/cli のほかの issue

devcontainers/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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