Docker Community Forums

Share and learn in the Docker community.

MySQL container - docker error on startup

Recreating mysql … error

ERROR: for mysql  Cannot start service mysql: unable to find user <username>: no matching entries in passwd file

ERROR: for mysql  Cannot start service mysql: unable to find user <username>: no matching entries in passwd file
ERROR: Encountered errors while bringing up the project.

I put this in docker-compose file:
user:

File “/etc/passwd” is fine. when I remove “user” setting mysql starts ok.