FROM python:3.7-alpine ENV PYTHONUNBUFFERED 1 ENV IS_DOCKER 0 WORKDIR /app COPY requirements.txt ./ COPY requirements.production.txt ./ COPY . ./ COPY sikweb/settings-sample-prod.py sikweb/settings.py # uWSGI, gunicorn etc. RUN apk add --no-cache --virtual .build-deps python3-dev build-base linux-headers pcre-dev openssl \ # PSQL && apk add --no-cache postgresql-dev \ # Pillow && apk add --no-cache jpeg-dev zlib-dev \ && pip install --upgrade pip \ && pip install -r requirements.txt \ && pip install -r requirements.production.txt \ && apk del .build-deps RUN python manage.py collectstatic --noinput # run migrate # python manage.py migrate --noinput ENTRYPOINT ["sh", "-c", "./production_entrypoint.sh"]