-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
27 lines (19 loc) · 828 Bytes
/
Copy pathDockerfile
File metadata and controls
27 lines (19 loc) · 828 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
FROM python:3.12.13-slim-bookworm@sha256:d50fb7611f86d04a3b0471b46d7557818d88983fc3136726336b2a4c657aa30b
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
I2S_MIGRATION_CONTRIBUTION_ROOT=/app/db/migration-contributions
WORKDIR /app
COPY pyproject.toml README.md ./
COPY src ./src
COPY db ./db
RUN pip install --no-cache-dir .
# The runtime does not invoke Perl. Debian marks perl-base Essential, but this
# slim image has no installed reverse dependency on it. Purge it after the
# Python installation and remove dpkg's previous-status snapshot so scanners
# cannot treat the removed source package as part of the final filesystem.
RUN dpkg --purge --force-remove-essential perl-base \
&& rm -f /var/lib/dpkg/status-old
RUN useradd --create-home --uid 10001 app
USER app
EXPOSE 8082
CMD ["backtest-api"]