0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

devcontainer でコンテナの名称を指定する

Last updated at Posted at 2025-03-30

Motivation

devcontainer を docker compose で起動するとコンテナ名称が docker compose の name 属性と一致して何のコンテナかわかりやすい。他方で devcontainer.json 単独での devcontainer を作成して起動するとコンテナ名称がランダムでわかりにくいと思っていた。

Solution

devcontainer.jsonrunArgs プロパティを以下のように使うことでコンテナ名称を指定できる。

{
    "runArgs": ["--name", "your container name"],
}
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?