-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
35 lines (21 loc) · 825 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
ARG PYTHON_VERSION=3.8-alpine3.11
FROM python:${PYTHON_VERSION} as base
FROM base as install-env
COPY [ "requirements.txt", "."]
RUN pip install --upgrade pip && \
pip install --upgrade setuptools && \
pip install --user --no-warn-script-location -r ./requirements.txt
FROM base
RUN set -ex && apk update
RUN apk add --update --no-cache \
bash=5.0.11-r1 \
git=2.24.3-r0
COPY --from=install-env [ "/root/.local", "/usr/local" ]
WORKDIR /usr/src/code
COPY [ ".", "." ]
RUN git config --global user.name "root" && \
git config --global user.email "[email protected]" && \
git config --global credential.helper cache
RUN find ./ -iname "*.py" -type f -exec chmod a+x {} \; -exec echo {} \;;
RUN python -m pip install --upgrade pip && \
pip install .