Docker-compose, define stack name


#1

Until now, I always used the docker create commands, but I wanted to try out docker-compose.

When I use this, Docker creates its own stack with name ‘docker’. I don’t know how I can define another name for this and eg define containers (services) in another stack.
In Portainer, I can create different stacks an use my .yml file, but I prefer it via cli.


#2

Use -p <stack_name>.


#3

damn, I already tried it, but received errors, so I thought it was wrong. But -p needs to be in front of ‘up’.

thanks again for the help!


#4

No worries. Glad you were able to sort it!