-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (30 loc) · 864 Bytes
/
Copy pathDockerfile
File metadata and controls
34 lines (30 loc) · 864 Bytes
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
FROM docker.io/library/python:3.9-alpine
COPY requirements.txt /app/requirements.txt
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories \
&& apk add --update --virtual .build-deps \
postgresql-dev \
gcc \
libffi-dev \
musl-dev \
openldap-dev \
openssl-dev \
cargo \
rust \
&& pip3 install --disable-pip-version-check --no-cache-dir -r /app/requirements.txt \
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --update --virtual .passport-rundeps \
$runDeps \
ca-certificates \
su-exec \
bash \
shadow \
&& apk del .build-deps
COPY . /app
WORKDIR /app
CMD ["/app/bin/boot"]
EXPOSE 8000