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

[Proposal] Expose the container name in remoteEnv

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

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

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
docker, docker-compose

調査の方向性

This is a specification proposal, so there are no code files yet; the relevant text is the remoteEnv and variable-substitution sections of the devcontainer.json spec. Read the related issues linked in the body (spec #184 and #692) to see what has already been decided about container naming. Done means a written proposal that defines when ${containerName} is resolved, covers Docker Compose primary services, and is discussed by maintainers.

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

説明

A process running in a devcontainer may need its container’s runtime name for logging or tracking purposes. Today, there is no way to reference that name in remoteEnv. The name field in devcontainer.json is a display name and may differ from the name shown by Docker or Podman.

Add a ${containerName} variable that can be used in remoteEnv:

{
  "remoteEnv": {
    "DEVCONTAINER_CONTAINER_NAME": "${containerName}"
  }
}

${containerName} should resolve to the actual runtime name of the primary development container. It should work for both newly created and reused containers, including the primary service in a Docker Compose setup. The tool should resolve it before running lifecycle commands or starting other processes to which remoteEnv applies.

This does not change how containers are named. Because the value is only known after container creation, ${containerName} would not be available in creation-time settings such as containerEnv or runArgs.

Related requests: container name in devcontainer.json (https://github.com/devcontainers/spec/issues/184) and a CLI option to choose the name (https://github.com/devcontainers/spec/issues/692).

主要言語
言語のデータがありません
スター
5.8k
フォーク
503
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

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

devcontainers/spec のほかの issue

devcontainers/spec の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

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

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