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

 

转载于:https://www.cnblogs.com/xuanmanstein/p/10552723.html

你可能感兴趣的:(docker-compose控制启动顺序)