[Rails] Building an environment with Rails 6.0 x Docker x MySQL
Refer to this article, Building a Docker environment with Rails 6 I got the following error.
Terminal
Bind for 0.0.0.0:3306 failed: port is already allocated
Translated literally, 3306 ports have already been assigned.
Terminal
$ docker ps
Terminal
CONTAINER ID IMAGE COMMAND CREATED
fbfa25282c46 mysql:5.7 "docker-entrypoint.s…" 7 hours ago
STATUS PORTS
Up 7 hours 0.0.0.0:3306->3306/tcp, 33060/tcp
Terminal
$ docker stop fbfa25282c46
Discover 3306! !!
Stop the container with Rails new was successfully completed.
Recommended Posts