nginx反向代理docker容器化django
1.新建Dockerfile
FROM python:3.8.5 MAINTAINER ChsterChen ENV PYTHONUNBUFFERED 1 COPY pip.conf /root/.pip/pip.conf RUN mkdir -p /var/www/html/student_api WORKDIR /var/www/html/student_api ADD . /var/www/html/student_api RUN pip install -r requirements.txt RUN chmod a+rwx -R /var/www/html/student_api/ RUN pwd VOLUME ["/tmp"] EXPOSE 8000 ENTRYPOINT ["uwsgi", "--ini", "uwsgi-docker.ini"] # RUN python manage.py collectstatic --noinput]