docker-compose up ができない(buildできない)
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
でコンテナを一掃してから、再度ビルドするとうまくいきました
Author And Source
この問題について(docker-compose up ができない(buildできない)), 我々は、より多くの情報をここで見つけました https://qiita.com/kuroro_ru/items/afe344c412e1fb874786著者帰属:元の著者の情報は、元のURLに含まれています。著作権は原作者に属する。
Content is automatically searched and collected through network algorithms . If there is a violation . Please contact us . We will adjust (correct author information ,or delete content ) as soon as possible .