-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
55 lines (43 loc) · 1.16 KB
/
Dockerfile
File metadata and controls
55 lines (43 loc) · 1.16 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
FROM python:3.11-alpine AS compile-image
RUN apk add --no-cache \
cargo \
freetype-dev \
fribidi-dev \
g++ \
gcc \
harfbuzz-dev \
jpeg-dev \
lcms2-dev \
libffi-dev \
libimagequant-dev \
libpng-dev \
libwebp-dev \
libxcb-dev \
libxslt-dev \
musl-dev \
openjpeg-dev \
openssl-dev \
python3-dev \
tcl-dev \
tiff-dev \
tk-dev \
zlib-dev
VOLUME [ "/scripts" ]
WORKDIR /settings
COPY ./requirements.txt .
# Upgrade setuptools to fix vulnerabilities
RUN pip install --upgrade setuptools && \
pip install --upgrade --user setuptools && \
pip install -r requirements.txt --no-cache-dir --user
## Runtime image
FROM python:3.11-alpine AS runtime-image
RUN apk add --no-cache bash \
python3-dev
RUN adduser -D seatable
USER seatable
WORKDIR /home/seatable
COPY --from=compile-image --chown=seatable /root/.local /home/seatable/.local
ENV PATH=/home/seatable/.local/bin:$PATH
COPY --chown=seatable ./entrypoint.sh .
RUN chmod +x entrypoint.sh
ENTRYPOINT ["/bin/sh", "./entrypoint.sh"]