0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【Rails】DockerからRails newができない

Posted at

【Rails】Rails 6.0 x Docker x MySQLで環境構築

こちらの記事を参考に、
Rails6でDocker環境を構築中、
下記のエラーが出ました。

ターミナル
Bind for 0.0.0.0:3306 failed: port is already allocated

直訳するとすでに3306のポートは割り当てられてますよとのこと。

ターミナル
$ docker ps
ターミナル
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
ターミナル
$ docker stop fbfa25282c46

3306を発見!!

でコンテナをストップさせ、
無事にrails newができました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?