23 lines
569 B
Docker
23 lines
569 B
Docker
FROM python:3.9-slim as builder
|
|
|
|
WORKDIR /app
|
|
|
|
RUN apt-get update -y && apt-get install -y --no-install-recommends gcc
|
|
COPY requirements.txt .
|
|
RUN pip3 wheel --no-cache-dir --no-deps --wheel-dir /app/wheels -r requirements.txt
|
|
|
|
|
|
FROM python:3.9-slim
|
|
ARG VERSION
|
|
ENV VERSION $VERSION
|
|
ARG BUILD_TIMESTAMP
|
|
ENV BUILD_TIMESTAMP $BUILD_TIMESTAMP
|
|
|
|
MAINTAINER Paul Warren <pwarren@pwarren.id.au>
|
|
WORKDIR /app
|
|
COPY --from=builder /app/wheels /wheels
|
|
COPY --from=builder /app/requirements.txt /
|
|
RUN pip install --no-cache /wheels/*
|
|
ADD . /app
|
|
ENTRYPOINT ["./gunicorn_start.sh"]
|
|
|