-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathDockerfile
More file actions
47 lines (38 loc) · 1.02 KB
/
Dockerfile
File metadata and controls
47 lines (38 loc) · 1.02 KB
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
38
39
40
41
42
43
44
45
46
47
FROM python:3.13-slim
RUN usermod -d /home www-data && chown www-data:www-data /home
# Install dependancies
RUN apt-get update \
&& apt-get install -y \
git \
libevent-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
# cryptography
build-essential \
libssl-dev \
libffi-dev \
gnupg2 \
# grab gosu for easy step-down from root
cargo \
rustc \
gosu \
&& apt-get clean \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /code
WORKDIR /code
COPY pyproject.toml poetry.lock* /code/
RUN pip install poetry==2.1.2
RUN pip install setuptools==80.1.0
RUN poetry install --no-root --without=docs
# Copy the rest of the code over
COPY ./ /code/
ARG GIT_COMMIT=
ENV GIT_COMMIT=${GIT_COMMIT}
ENV POETRY_NO_INTERACTION=1
ENV POETRY_VIRTUALENVS_CREATE=0
ENV POETRY_VIRTUALENVS_IN_PROJECT=1
RUN poetry install --without docs
EXPOSE 7777
CMD ["gosu", "www-data", "python3", "-m", "invoke", "server"]