-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
47 lines (32 loc) · 801 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
38
39
40
41
42
43
44
45
46
47
ARG PYTHON_VERSION=3.10.2
ARG ALPINE_VERSION=3.15
# -------------------- py-base -------------------- #
FROM python:${PYTHON_VERSION}-alpine${ALPINE_VERSION} AS py-base
RUN set -x \
&& apk add --no-cache \
jpeg-dev \
zlib-dev \
libjpeg
WORKDIR /chaos-studio
# -------------------- py-dependencies ------------ #
FROM py-base AS py-dependencies
COPY ./requirements.txt ./
RUN set -x \
&& apk add --no-cache \
git \
unzip \
gcc \
g++ \
musl-dev \
linux-headers \
libffi-dev \
\
&& mkdir /requirements \
\
&& pip install --prefix=/requirements -Ur requirements.txt
# -------------------- py-cli -------------------- #
FROM py-base AS py-cli
COPY --from=py-dependencies /requirements /usr/local
COPY . .
RUN set -x \
&& pip install -e .