[Rails] Rails new cannot be done from Docker

[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

[Rails] Rails new cannot be done from Docker
Rails tutorial When rails new cannot be done due to different versions
Options for rails new and settings to be done after rails new
[Rails 6] MySQL 2 cannot be bundle install
[Rails] Posts cannot be deleted when commented! ??
Rails g devise: install cannot be executed!
[Windows] gem install sqlite3 cannot be done
Rails server cannot be started in Cloud9
[Rails 6] method :: delete cannot be used with link_to
Rails error messages cannot be translated into Japanese
Rails Docker ~ Part 1 ~
Rails Docker ~ Part 2 ~
Kotlin's reified function cannot be called from java.
Settings to be done when changing from Sublime Text to VScode (when writing Ruby On Rails)
Systemctl cannot be used on Ubuntu inside Docker container
Rails Docker environment construction
Docker x Rails 6 (memo)
Rails deploy with Docker
Cloud9 (Rails) from Github
Windows10 "rails s" cannot be started. Unable to access localhost: 3000
[rails] Problems that cannot be registered / logged in with devise
`Array # index` cannot be searched from the middle,` String # index` can be
Avoid the problem that session cannot be acquired when canary release when upgrading from Rails 4.2.x to 5.0.x