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