LoginSignup
0
1

More than 5 years have passed since last update.

"failed: port is already allocated"の解決法

Posted at

docker-composeを立ち上げ時に、"failed: port is already allocated"とエラーが出た時の解決法

docker-composeを立ち上げた時に、上記のエラーが出る時がある。

原因

同じポート番号で複数立ち上がっているので、「すでにそのポートは割り当てられているよ」と怒られる。

解決策

まず調べる。$lsof -i:ポート番号
PIDが同じ番号のものが出てきたら、それキルする。$kill -9 PID
その後、docker-compose upすると立ち上がる。

0
1
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
1