aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
blob: 0497282be193841c52b496b1f98a9f29a3919f6c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM python:3.11-slim AS os-cache

ENV TZ=UTC
ENV PYTHONUNBUFFERED=1
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_CREATE=true
ENV POETRY_VIRTUALENVS_IN_PROJECT=true

ARG DEBIAN_FRONTEND=noninteractive
RUN apt update -y
RUN apt upgrade -y
RUN apt install -y build-essential

WORKDIR /app

# FIXME: README.md seemed to be required here but I'm not sure why!
COPY poetry.lock pyproject.toml Makefile README.md ./

RUN pip install "poetry~=1.2"

FROM os-cache AS image

COPY poker ./poker
RUN make install-prod

FROM os-cache AS test-image

COPY setup.cfg ./
COPY poker ./poker
COPY tests ./tests
RUN make install