cannot create /etc/nginx/nginx.conf: Directory nonexistent and starting container caused “exec: \”supervisord\“: executable file not found in $PATH”

前端 未结 2 1648
猫巷女王i
猫巷女王i 2021-01-16 05:14

I am building docker image to deploy flask app with uwsgi/nginx.

Here are relevant file for to create a docker container for same

Dockerfile conte

2条回答
  •  北海茫月
    2021-01-16 06:00

    Since managing answers with comments is nearly impossible, I'll post the outlook of the supervisor_app.conf file here:

    [program:nginx]
    command = /usr/sbin/nginx -g "daemon off;"
    stdout_logfile=/dev/stdout
    stdout_logfile_maxbytes=0
    stderr_logfile=/dev/stderr
    stderr_logfile_maxbytes=0
    

    I think it's what you need.


    EDIT: I just saw the comment about supervisor not being found. It seems that you haven't installed it in Dockerfile. Here's how to add it:

    apt-get install -y supervisor
    

    You can add just the package name in one of the steps, like this:

    RUN apt-get install -y ca-certificates supervisor
    

    Note that you already have that line, just without supervisor.


    EDIT2: As per @thsutton's answer, you also need to add nginx package, the same way you did for supervisor.

提交回复
热议问题