Skip to content

Instantly share code, notes, and snippets.

@omps
Created January 21, 2018 15:57
Show Gist options
  • Save omps/bcb465d0d7a2526364a6a85d5bd5f21b to your computer and use it in GitHub Desktop.
Save omps/bcb465d0d7a2526364a6a85d5bd5f21b to your computer and use it in GitHub Desktop.
docker commands and errors
MySQL Connection Error: (2002) php_network_getaddresses: getaddrinfo failed: Name or service not known
ERROR: for lamp_db_1 Cannot create container for service db: Conflict. The container name "/lamp_db_1" is already in use by container "87dba9af0946191a3a60fd8868624d8954263e4edacf416c75c4d7b62c72d9d1". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for db Cannot create container for service db: Conflict. The container name "/lamp_db_1" is already in use by container "87dba9af0946191a3a60fd8868624d8954263e4edacf416c75c4d7b62c72d9d1". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.
Creating lamp_db_1 ... error
ANswer: no solution, just remove the container and recreate.
# Start docker
docker-compose up -d
# shutdown docker
docker-compose down
# shutdown with its volumes
docker-compose down --volumes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment