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

前端 未结 2 1649
猫巷女王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.

    0 讨论(0)
  • 2021-01-16 06:03

    Does the python:3.6 image already contain nginx and supervisord? If not, it is up to you to install them (with apt-get or a similar command, as appropriate).

    The fact that the nginx config file doesn't exist, and the binary doesn't exist would suggest to me that maybe the packages are not installed.

    0 讨论(0)
提交回复
热议问题