-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
37 lines (27 loc) · 1.06 KB
/
Dockerfile
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
32
33
34
35
36
37
FROM python:3.13.2-alpine@sha256:323a717dc4a010fee21e3f1aac738ee10bb485de4e7593ce242b36ee48d6b352
LABEL maintainer="SBB Polarion Team <[email protected]>"
ARG APP_IMAGE_VERSION=0.0.0
# hadolint ignore=DL3018
RUN apk add --no-cache \
chromium \
dbus \
font-dejavu \
font-noto \
font-liberation \
pango \
py3-brotli \
py3-cffi
ENV WORKING_DIR="/opt/weasyprint"
ENV CHROMIUM_EXECUTABLE_PATH="/usr/bin/chromium"
ENV WEASYPRINT_SERVICE_VERSION=${APP_IMAGE_VERSION}
WORKDIR ${WORKING_DIR}
RUN BUILD_TIMESTAMP="$(date -u +'%Y-%m-%dT%H:%M:%SZ')" && \
echo "${BUILD_TIMESTAMP}" > "${WORKING_DIR}/.build_timestamp"
COPY requirements.txt ${WORKING_DIR}/requirements.txt
COPY ./app/*.py ${WORKING_DIR}/app/
COPY ./pyproject.toml ${WORKING_DIR}/pyproject.toml
COPY ./poetry.lock ${WORKING_DIR}/poetry.lock
RUN pip install --no-cache-dir -r "${WORKING_DIR}"/requirements.txt && poetry install --no-root && poetry env activate
COPY entrypoint.sh ${WORKING_DIR}/entrypoint.sh
RUN chmod +x ${WORKING_DIR}/entrypoint.sh
ENTRYPOINT [ "./entrypoint.sh" ]