docker問題解決:WARNING: Found orphan containers ** command with the --remove-orphans flag to clean it up.


問題:WARNING: Found orphan containers (image_zookeeper_1, image_kafka_1, image_jhipster-registry_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.

產生原因:

如果將docker-compose的鏡像的配置放在同一個目錄下時,docker運行時生成的鏡像實例會有相同的前綴,就是當前的目錄名,也就是說默認相同前綴的是同一組實例,當你在當前目錄下還有別的鏡像的配置文件,在運行時就會出現以下警告

解決:

1.在啟動時重命名實例

docker-compose -p mysql -f /opt/docker/image/mysql-compose.yml up -d

2.將文件放在不同的目錄下運行

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM