-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (20 loc) · 715 Bytes
/
Dockerfile
File metadata and controls
29 lines (20 loc) · 715 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
# syntax=docker/dockerfile:1.4
FROM python:3.12-slim AS base
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1
WORKDIR /app
# Install runtime dependencies via Poetry export -> requirements.txt to keep final image small
COPY pyproject.toml .
RUN pip install --upgrade pip \
&& pip install poetry \
&& poetry export -f requirements.txt --without-hashes | pip install --no-cache-dir -r /dev/stdin \
&& pip uninstall -y poetry
# Copy application code
COPY app app
# Copy runtime entrypoint
COPY scripts/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
# Expose server port
EXPOSE 8000
# Default command relies on entrypoint script which handles TLS flags
ENTRYPOINT ["/entrypoint.sh"]