FROM python:3.5-alpine RUN apk add --update --no-cache \ autoconf \ gcc \ libc-dev \ linux-headers \ nginx \ curl \ && pip install --upgrade setuptools \ && pip install gunicorn RUN apk del \ autoconf \ gcc \ libc-dev \ linux-headers \ && : RUN mkdir -p /run/nginx /run/gunicorn && \ touch /run/nginx/nginx.pid && \ chown -R nginx:nginx /var/log/nginx /run/nginx /run/gunicorn && \ chmod 0775 /var/log/nginx && \ chmod 0770 /var/lib/nginx/tmp /run/gunicorn && \ chmod 0664 /run/nginx/nginx.pid