-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (21 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
29 lines (21 loc) · 766 Bytes
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
FROM python:3.11-slim
WORKDIR /app
# Install system dependencies and Poetry
RUN apt-get update && apt-get install -y \
postgresql-client \
curl \
&& rm -rf /var/lib/apt/lists/* \
&& curl -sSL https://install.python-poetry.org | python3 - \
&& ln -s /root/.local/bin/poetry /usr/local/bin/poetry
# Copy poetry files
COPY pyproject.toml poetry.lock* README.md ./
# Configure poetry
RUN poetry config virtualenvs.create false
# Install dependencies only (not the project itself yet)
RUN poetry install --no-interaction --no-ansi --no-root
# Copy application code
COPY . .
# Install the project now that source is available
RUN poetry install --no-interaction --no-ansi
# Keep container running for development
CMD ["tail", "-f", "/dev/null"]