docker-compose控制启动顺序


用官方方案https://docs.docker.com/compose/startup-order/

下载wait-for-it.sh https://github.com/vishnubob/wait-for-it

别忘了在主机上设置一下可执行

chmod +x ./wait-for-it.sh

不然

ERROR: for db_json  Cannot start service db_json: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"/wait-for-it.sh\": permission denied": unknown

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM