FROM docker.io/alpine:3.14 RUN apk update RUN apk add nginx python3 py3-pip py3-setuptools py3-virtualenv \ postgresql-client py3-psycopg2 postgresql RUN apk add linux-headers postgresql-dev gcc python3-dev libc-dev COPY app/requirements.txt /requirements.txt RUN pip3 install --no-cache-dir -r /requirements.txt RUN rm /requirements.txt RUN pip3 install --no-cache-dir uwsgi RUN apk del linux-headers postgresql-dev gcc python3-dev libc-dev RUN mkdir /app /static COPY app /app WORKDIR /app ENV STATIC_ROOT=/static RUN python3 manage.py collectstatic COPY entrypoint.sh / ENTRYPOINT /entrypoint.sh