-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
37 lines (30 loc) · 936 Bytes
/
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
FROM python:3.9.16-alpine3.17 as build-env
WORKDIR /root
COPY requirements.txt .
COPY dist/dsm_auth*.whl .
RUN set -x \
&& echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.15/main/" > /etc/apk/repositories \
&& apk add --no-cache --virtual .build-deps \
bash \
drill \
bind-tools \
g++ \
libc-dev \
python3-dev \
libffi libffi-dev \
openssl-dev \
make \
mariadb-dev \
&& pip3 install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements.txt \
&& pip3 install dsm_auth*.whl
FROM python:3.9.16-alpine3.17
WORKDIR /root
COPY --from=build-env /usr/local/lib/python3.8/site-packages /usr/local/lib/python3.8/site-packages
RUN set -x \
&& echo "https://mirror.tuna.tsinghua.edu.cn/alpine/v3.15/main/" > /etc/apk/repositories \
&& apk add --no-cache --virtual .build-deps \
bash \
mysql-client \
redis \
curl \
mariadb-dev \