How to fix basename of containers when using docker-compose? -


it seems docker-compose adds current folder name base-name each created container. following directory structure:

/myproj/docker-compose.yml 

and docker-compose.yml content:

web: ... worker: ... 

docker-compose create following containers:

myproj_web_1 myproj_worker_1 

i don't mind suffix (_x) "fix" myproj constant "always_same" move docker-compose.yml file around , still have containers same names.

how can it?

there 2 ways this.

set environment variable with

export compose_project_name=foo 

or starting stack -p switch

docker-compose -p foo build docker-compose -p foo 

Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -