添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
含蓄的消炎药  ·  Lectora Inspire ...·  3 月前    · 
年轻有为的葫芦  ·  Notion ...·  4 月前    · 
11
6

More than 3 years have passed since last update.

docker-compose up ができない(buildできない)

Last updated at Posted at 2021-02-14
docker-compose up --build

でビルドしようとしたが下記のようなエラーが出た。

ERROR: for phpmyadmin  Cannot create container for service phpmyadmin: Conflict. The container name "/phpmyadmin" is already in use by container "〇〇". You have to remove (or rename) that container to be able to reuse that name.
Creating mysql       ... 〇〇". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for mysql  Cannot create container for service db: Conflict. The container name "/mysql" is already in use by container "〇〇". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for phpmyadmin  Cannot create container for service phpmyadmin: Conflict. The container name "/phpmyadmin" is already in use by container "〇〇". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for app  Cannot create container for service app: Conflict. The container name "/laravel" is already in use by container "b035ca2af11bfd74a1b04d341cd1ac0075b4301bdb484a598167f1db2b869b1a". You have to remove (or rename) that container to be able to reuse that name.
ERROR: for db  Cannot create container for service db: Conflict. The container name "/mysql" is already in use by container "〇〇". You have to remove (or rename) that container to be able to reuse that name.
ERROR: Encountered errors while bringing up the project.

既存のコンテナ名と重複してしまうためビルドできないということなので

docker rm $(docker ps -aq) --force

でコンテナを一掃してから、再度ビルドするとうまくいきました

11
6
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
11
6