How to fix basename of containers when using docker-compose?
you can add this to the .yml file
container_name: my-web-container
as said here
There are two ways to do this.
Set the environment variable with
export COMPOSE_PROJECT_NAME=foo
or by starting your stack with the -p
switch
docker-compose -p foo build
docker-compose -p foo up