nginx docker官方镜像使用自定义启动命令启动失败

官方参考资料

  • 默认启动命令
nginx -g daemon off;

If you add a custom CMD in the Dockerfile, be sure to include -g daemon off; in the CMD in order for nginx to stay in the foreground, so that Docker can track the process properly (otherwise your container will stop immediately after starting)!

必须使用 -g deamon off;指令使nginx在前台运行,这样docker才能正确的跟踪执行过程,否则容器将在启动后立刻停止

posted on 2022-04-11 22:39  路过君  阅读(240)  评论(0编辑  收藏  举报

导航