From e34480c174a7bc8819e4cfea0c40bf2cb5dc8bbc Mon Sep 17 00:00:00 2001 From: Florian Bezannier Date: Sat, 19 Jun 2021 00:19:07 +0200 Subject: [PATCH] armv7 fix --- Dockerfile | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2056f8d..1442111 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,11 @@ FROM python:3-slim +ARG TARGETPLATFORM COPY . /psa_car_controller/ WORKDIR /config -RUN [ "$TARGETPLATFORM" = "linux/arm/v7" ] && apk update && apk add python3-dev gcc libc-dev; \ - pip3 install --no-cache-dir -r /psa_car_controller/requirements.txt +RUN if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then apt-get update && apt-get install -y gcc && apt-get clean ; fi ; \ + pip3 install --no-cache-dir -r /psa_car_controller/requirements.txt ; \ + apt-get remove -y gcc 2> /dev/null ; \ + apt-get autoremove -y EXPOSE 5000 RUN chmod +x /psa_car_controller/docker_files/init.sh ENV PSACC_BASE_PATH=/ PSACC_PORT=5000 PSACC_OPTIONS="-c -r --web-conf" PSACC_CONFIG_DIR="/config"