forked from williamjacksn/docker-excalibur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
26 lines (18 loc) · 997 Bytes
/
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
FROM python:3.9.19-slim-bookworm
RUN /usr/sbin/useradd --create-home --shell /bin/bash --user-group python
ARG DEBIAN_FRONTEND=noninteractive
RUN /usr/bin/apt-get update \
&& /usr/bin/apt-get install --assume-yes ghostscript libgl1 libglib2.0-0 libsm6 libxext6 libxrender1 \
&& rm -rf /var/lib/apt/lists/*
USER python
RUN /usr/local/bin/python -m venv /home/python/venv
COPY --chown=python:python requirements.txt /home/python/docker-excalibur/requirements.txt
RUN /home/python/venv/bin/pip install --no-cache-dir --requirement /home/python/docker-excalibur/requirements.txt
ENV EXCALIBUR_HOME="/home/python/excalibur" \
PATH="/home/python/venv/bin:${PATH}" \
PYTHONDONTWRITEBYTECODE="1" \
PYTHONUNBUFFERED="1" \
TZ="Etc/UTC"
ENTRYPOINT ["/home/python/venv/bin/python", "/home/python/docker-excalibur/run.py"]
LABEL org.opencontainers.image.source="https://github.com/williamjacksn/docker-excalibur"
COPY --chown=python:python run.py /home/python/docker-excalibur/run.py