DockStation is developer-centric application to managing projects based on Docker. Instead of lots of CLI commands you can monitor, configure, and manage services and containers using just a GUI.
We have some docker-compose config which has container-name param.
After import project into DockStation, I have an error.
ERROR: some-container Cannot create container for service mongo: Conflict. The container name "/some-container" is already in use by container "f540227f2f582abf0e671eb8b732d5b472e55f8159a3b6c36dd7af2f4c014195". You have to remove (or rename) that container to be able to reuse that name.
The problem:
We create .env file in the project directory with COMPOSE_PROJECT_NAME param.
Docker tries to recreate the container because Compose sees another project name.
But we have the container with this name already.
The solution:
Don't create .env file. Before create need to check a unique project directory name or .env file exists. If a user doesn't have .env file with COMPOSE_PROJECT_NAME param and directory of project isn't a unique need to notify about the possibility of incorrect work.
We have some
docker-compose
config which hascontainer-name
param. After import project into DockStation, I have an error.The problem: We create
.env
file in the project directory withCOMPOSE_PROJECT_NAME
param. Docker tries to recreate the container because Compose sees another project name. But we have the container with this name already.The solution: Don't create
.env
file. Before create need to check a unique project directory name or.env
file exists. If a user doesn't have.env
file withCOMPOSE_PROJECT_NAME
param and directory of project isn't a unique need to notify about the possibility of incorrect work.Related issues: https://github.com/DockStation/dockstation/issues/108 https://github.com/docker/compose/issues/745