-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
38 lines (33 loc) · 864 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
# Version: 0.0.3
FROM python:3.10.9-alpine3.17 AS base
RUN apk add --no-cache --update \
openssh-client \
bash \
git \
make \
sshpass
FROM base AS builder
RUN apk add --no-cache --update \
linux-headers \
gcc \
musl-dev \
python3-dev \
libffi-dev \
openssl-dev
ENV VIRTUAL_ENV=/opt/venv
ENV PIP_VERSION=22.3.1
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python3 -m venv $VIRTUAL_ENV
COPY requirements.txt /requirements.txt
RUN pip install \
--no-cache-dir \
--upgrade pip==${PIP_VERSION} \
&& pip install \
--no-cache-dir \
--extra-index-url https://alpine-wheels.github.io/index \
-r /requirements.txt
FROM base
LABEL maintainer="Chudakov Aleksandr [email protected]"
ENV VIRTUAL_ENV=/opt/venv
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
COPY --from=builder $VIRTUAL_ENV $VIRTUAL_ENV