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
Post a Comment