From 732bf4ac92f331f98e0e7ba640c70a0ae23cb69f Mon Sep 17 00:00:00 2001 From: David <39565245+dmunozv04@users.noreply.github.com> Date: Sat, 26 Mar 2022 14:39:04 +0100 Subject: [PATCH] Change to alpine docker Armv7 test --- Dockerfile | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6b596b3..50f04c5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,23 +1,21 @@ # syntax=docker/dockerfile:1 -FROM python:3.10-bullseye AS compile-image - -RUN apt-get update && \ - apt-get install -y --no-install-recommends build-essential gcc rustc +FROM python:3.9.7-alpine RUN python -m venv /opt/venv -ENV PATH="/opt/venv/bin:$PATH" +ENV PATH="/opt/venv/bin:$PATH" PIP_NO_CACHE_DIR=off COPY requirements.txt . -RUN pip install --upgrade pip && pip install wheel && pip install -r requirements.txt +RUN apk add gcc musl-dev build-base linux-headers libffi-dev rust cargo openssl-dev git && \ + pip install setuptools-rust && \ + pip install -r requirements.txt && \ + apk del gcc musl-dev build-base linux-headers libffi-dev rust cargo openssl-dev git && \ + rm -rf /root/.cache /root/.cargo -FROM python:3.10-slim-bullseye -COPY --from=compile-image /opt/venv /opt/venv - -ENV PATH="/opt/venv/bin:$PATH" +COPY requirements.txt . WORKDIR /app