Last active
February 25, 2021 19:03
-
-
Save aleksandr-kotlyar/6d01d79266b77c32aa8a3bc23a1f0708 to your computer and use it in GitHub Desktop.
python alpine openjdk allure cryptography multistage
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM python:3.7.9-alpine3.13 AS compile-image | |
RUN apk upgrade && apk --no-cache add \ | |
# for badges and anybadge | |
gcc=10.2.1_pre1-r3 \ | |
libc-dev=0.7.2-r3 \ | |
# for cryptography | |
libressl-dev=3.1.5-r0 \ | |
libffi-dev=3.3-r2 \ | |
cargo=1.47.0-r2 \ | |
rust=1.47.0-r2 \ | |
openssl-dev=1.1.1i-r0 | |
WORKDIR /app | |
RUN python -m venv /app/venv | |
ENV PATH="/app/venv/bin:$PATH" | |
# for anybadge compilation | |
RUN python3 -c 'import sys; f = open("/usr/local/lib/python3.7/site-packages/_manylinux.py", "w"); f.write("manylinux1_compatible = True"); f.close()' | |
COPY requirements.txt /app/requirements.txt | |
RUN pip3 install --upgrade pip setuptools wheel \ | |
&& pip3 install --no-cache-dir -r requirements.txt | |
FROM python:3.7.9-alpine3.13 AS build-image | |
COPY --from=compile-image /app/venv /app/venv | |
COPY allure-2.13.8 /app/allure-2.13.8/ | |
RUN apk --no-cache add \ | |
# for external pipeline | |
curl=7.74.0-r0 \ | |
git=2.30.1-r0 \ | |
openssh-client=8.4_p1-r2 \ | |
openjdk8-jre=8.275.01-r0 \ | |
&& rm -rf /var/cache/apk/* | |
ENV PATH="/app/allure-2.13.8/bin:$PATH" | |
ENV PATH="/app/venv/bin:$PATH" | |
WORKDIR /app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment