docker-compose image named: “prefix_%s_1” instead of “%s”

According to docker compose issue #745:

By default, Compose bases the project name on basename of the
directory compose commands are run from. The project name can be
overridden either by passing a -p / –project-name option for each
command or setting the COMPOSE_PROJECT_NAME environment variable.

You can set the prefix of your choice to your container names by writing something like this:

$ docker-compose -p MY_PROJECT_NAME

which is the equivalent to (the more readable):

$ docker-compose --project-name MY_PROJECT_NAME

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)