desteg/Dockerfile

24 lines
569 B
Docker
Raw Normal View History

2022-08-11 12:11:16 +10:00
FROM python:3.9-slim as builder
2020-11-09 11:51:52 +11:00
2022-08-11 12:11:16 +10:00
WORKDIR /app
2020-11-09 11:51:52 +11:00
2022-08-11 12:11:16 +10:00
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
2020-11-09 11:51:52 +11:00
2022-08-11 12:11:16 +10:00
FROM python:3.9-slim
ARG VERSION
ENV VERSION $VERSION
ARG BUILD_TIMESTAMP
ENV BUILD_TIMESTAMP $BUILD_TIMESTAMP
2020-11-09 11:51:52 +11:00
2022-08-11 12:11:16 +10:00
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
2020-11-09 14:17:17 +11:00
ENTRYPOINT ["./gunicorn_start.sh"]
2022-08-11 12:11:16 +10:00