forked from cms-dev/cms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
48 lines (38 loc) · 1.2 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
38
39
40
41
42
43
44
45
46
47
48
FROM debian:bullseye as isolate-builder
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
libcap-dev \
&& rm -rf \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/*
COPY isolate /isolate
RUN make -C /isolate isolate
FROM python:3.10 AS cms
RUN \
apt-get update \
&& apt-get install -y --no-install-recommends \
postgresql-client \
libcap2 \
&& rm -rf \
/tmp/* \
/var/{cache,log}/* \
/var/lib/apt/lists/*
COPY requirements.txt /
RUN pip3 install --no-cache-dir -r /requirements.txt
COPY . /cms
RUN pip3 install --no-cache-dir -e /cms
RUN \
sed -i 's/collections.MutableMapping/collections.abc.MutableMapping/g' /usr/local/lib/python3.10/site-packages/tornado/httputil.py \
&& cp /cms/config/cms.conf.sample /usr/local/etc/cms.conf \
&& mkdir -p \
/var/local/log/cms \
/var/local/cache/cms \
/var/local/lib/cms \
/var/local/run/cms \
/var/local/include/cms \
/var/local/share/cms
COPY --from=isolate-builder /isolate/isolate /usr/local/bin/isolate
COPY --from=isolate-builder /isolate/default.cf /usr/local/etc/isolate