-
Notifications
You must be signed in to change notification settings - Fork 77
Expand file tree
/
Copy pathDockerfile
More file actions
58 lines (46 loc) · 1.18 KB
/
Dockerfile
File metadata and controls
58 lines (46 loc) · 1.18 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
48
49
50
51
52
53
54
55
56
57
58
FROM python:3.13-slim
RUN usermod -d /home www-data \
&& chown www-data:www-data /home \
&& apt-get update
# mfr dependencies
RUN apt-get install -y \
git \
make \
gcc \
build-essential \
gfortran \
r-base \
libblas-dev \
libevent-dev \
libfreetype6-dev \
libjpeg-dev \
libpng-dev \
libtiff5-dev \
libxml2-dev \
libxslt1-dev \
zlib1g-dev \
gnupg2 \
# convert .step to jsc3d-compatible format
freecad \
# pspp dependencies
pspp \
# grab gosu for easy step-down from root
gosu
RUN apt-get clean
RUN apt-get autoremove -y
RUN rm -rf /var/lib/apt/lists/*
RUN mkdir -p /code
WORKDIR /code
COPY pyproject.toml poetry.lock* /code/
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_CREATE=0 \
POETRY_VIRTUALENVS_IN_PROJECT=1
RUN pip install poetry==2.1.2 setuptools==80.1.0 \
&& poetry install --no-root --without=docs
# Copy the rest of the code over
COPY ./ /code/
ARG GIT_COMMIT=
ENV GIT_COMMIT=${GIT_COMMIT}
RUN poetry install --without=docs
EXPOSE 7778
CMD ["gosu", "www-data", "invoke", "server"]