FROM python:3.7.9-slim-stretch
COPY requirements.txt /tmp/requirements.txt
RUN \
echo "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib" > /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian-security stretch/updates main" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/debian-security stretch/updates main" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib" >> /etc/apt/sources.list && \
echo "deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib" >> /etc/apt/sources.list && \
echo "deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" >> /etc/apt/sources.list && \
\
apt-get update && \
apt-get install -y libc6-dev gcc mime-support && \
pip3 install -U -r /tmp/requirements.txt -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
pip3 install supervisor uwsgi -i http://pypi.douban.com/simple --trusted-host pypi.douban.com && \
\
echo_supervisord_conf > /etc/supervisord.conf && \
echo "[include]" >> /etc/supervisord.conf && \
echo "files = /etc/supervisord.d/*.conf" >> /etc/supervisord.conf && \
\
apt-get remove -y gcc libc6-dev && \
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false && \
rm -rf /var/lib/apt/lists/*
ENTRYPOINT ["supervisord", "-n","-c", "/etc/supervisord.conf"]
Dockerfile——supervisor+uwsgi
最新推荐文章于 2024-03-16 10:47:14 发布