Skip to content

Latest commit

 

History

History
28 lines (19 loc) · 685 Bytes

docker-project-name.md

File metadata and controls

28 lines (19 loc) · 685 Bytes

Change docker project name

The Docker project name is generated by the current folder.

Project name: {current-folder}_{service}_{id}

/my-project/docker-compose.yml, container: web
Project name: my-project_web_1

However, if the folder name is the same as another project, there is a problem and a container shuts down.

To fix this, you can specify the project name itself in the .env file:

COMPOSE_PROJECT_NAME=my-project1_www

After starting both containers:

/my-project1/www/docker-compose.yml, container: web
Project name: my-project1_www_web_1

/my-project2/www/docker-compose.yml, container: web
Project name: my-project2_www_web_1