caprio
caprio

Reputation: 367

How run docker-compose without project-name?

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.

Can I run docker-compose with an empty project-name? I declare the volume with the name: myvolume and I would like to have the name myvolume after starting the container and not e.g. user_myvolume. Is it possible?

Upvotes: 3

Views: 10488

Answers (2)

dodov
dodov

Reputation: 5844

For what it's worth, if you want to remove the project name because it appears in your terminal, you can use --no-log-prefix, as explained in this answer.

Upvotes: 0

silleknarf
silleknarf

Reputation: 1219

It's not possible to have an empty project name as it's used internally by docker as part of the key for container.

It's discussed in more detail here: Proposal: support for empty project names.

Upvotes: 1

Related Questions