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?

More than 1 year has passed since last update.

devcontainer.json

Posted at

devcontainer.json

VS Codeを使用して開発を行う際に、開発環境の設定を定義するためのファイル

このファイルは、VS Code内でRemote Containers(拡張機能)を使用してコンテナ内の開発環境を構築するために使用される

devcontainer.json ファイルに含まれる情報

コンテナの設定

  • 開発に使用するコンテナのイメージやビルド方法、ポートの転送、マウントするボリュームなどの設定が含まれる
    →開発者は共通の開発環境を簡単にセットアップできる

拡張機能のインストール

  • 開発環境内にVS Code拡張機能をインストールするための指示が含まれる
    →開発環境内で特定の拡張機能を利用できる

シェルの設定

  • 開発環境内で使用するシェル(Bash、PowerShellなど)の設定が含まれる
    →コンテナ内でのシェルの動作をカスタマイズできる

プロジェクト固有の設定

  • 特定のプロジェクトに固有の設定を含めることができる
    例)プロジェクト固有の環境変数や設定ファイルの配置場所などの指定ができる

開発者はローカル環境と異なる環境 例)Dockerコンテナ内 での開発が簡単にできるに行うことができる
異なるプロジェクト間で共通の開発環境を確保し、環境のバージョン管理がしやすい

devcontainer.json ファイルは、VS CodeのRemote Containersを有効にしたプロジェクト内に配置される

VS Codeがそれを認識してコンテナ内の開発環境を自動的に構築する

開発者は、VS Codeの「リモートエクスプローラー」からコンテナ内のファイルにアクセスし、開発を行うことができる

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?