Movatterモバイル変換


[0]ホーム

URL:


Version 1.107 is now available! Read about the new features and fixes from November.

Dismiss this update

Set Docker Compose project name

Visual Studio Code will respect the value you configure for the Docker Composeproject name.

The top-level propertyname in thedocker-compose.yml can be used to set the project name.

Alternatively, you can set theCOMPOSE_PROJECT_NAME environment variable for the VS Code process, or specify it in a.env file in the same folder as thedocker-compose.yml.

Note: make sure to close all open VS Code windows first.

To start VS Code from the command line:

# from bashCOMPOSE_PROJECT_NAME=foo code .
# from PowerShell$env:COMPOSE_PROJECT_NAME=foocode .

Alternatively, add the following entry to a.env file in the same folder as thedocker-compose.yml:

COMPOSE_PROJECT_NAME=foo

When no project name is configured and thedocker-compose.yml is in the.devcontainer folder, the Docker Compose default of using thedocker-compose.yml folder's basename is overridden with${project-folder-basename}_devcontainer to avoid name collisions with other projects.

12/10/2025

    [8]ページ先頭

    ©2009-2025 Movatter.jp