Skip to content

Cannot create container for service - many of them #84

@jramiresbrito

Description

@jramiresbrito

After following the setup instructions, I've successfully installed it using docker-compose run composer create-project.
Then, in the next step, to run the containers, docker complains about the name of the containers:

Creating -composer ... error

ERROR: for -composer  Cannot create container for service composer: Invalid container name (-composer), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

ERROR: for mailhog  Cannot create container for service mailhog: Invalid container name (-mailhog), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

ERROR: for mysql  Cannot create container for service mysql: Invalid container name (-mysql), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

ERROR: for composer  Cannot create container for service composer: Invalid container name (-composer), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed

the thing is the composer can't find the environment variables set in .env file and it defaults to a blank string:

WARNING: The APP_NAME variable is not set. Defaulting to a blank string.
WARNING: The DOMAIN variable is not set. Defaulting to a blank string.
WARNING: The DB_ROOT_PASSWORD variable is not set. Defaulting to a blank string.

How to make it work?

PS: Sorry about the off-topic. In the step of adding the domain to the hosts file, I've overridden the old entry:

127.0.0.1 localhost

to

127.0.0.1 myapp.local

Is that correct, or should I just add another entry?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions