summaryrefslogtreecommitdiffstats
path: root/dev/Dockerfile
blob: 49d03ffda53485381b7d81fb58640c4cef7dd2f8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
ARG python_version=3.11

FROM --platform=linux/amd64 ghcr.io/chrislovering/python-poetry-base:$python_version-slim

# Install project dependencies
WORKDIR /app
COPY pyproject.toml poetry.lock ./
RUN poetry install --no-root --only dev,main

# Copy the source code in last to optimize rebuilding the image
COPY . .

# Install again, this time with the root project
RUN poetry install --only-root

ENTRYPOINT ["poetry"]
CMD ["run", "python", "-m", "bot"]