Arm build fixes (#68)

* Add rustc compiler and remove when not needed (smaller docker layer)

* Using the magical ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1 to get around ARM issues
pull/70/head
dgtlmoon 3 years ago committed by GitHub
parent d50ff0b31c
commit baaee30499
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2,7 +2,7 @@ name: Test, build and push to Docker Hub
on:
push:
branches: [ master ]
branches: [ master, arm-build ]
jobs:
build:

@ -1,7 +1,11 @@
FROM python:3.8-slim
# rustc compiler would be needed on ARM type devices but theres an issue with some deps not building..
ARG CRYPTOGRAPHY_DONT_BUILD_RUST=1
COPY requirements.txt /tmp/requirements.txt
RUN apt-get update && apt-get install -y libssl-dev libffi-dev gcc libc-dev libxslt-dev zlib1g-dev g++ --no-install-recommends && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r /tmp/requirements.txt
RUN apt-get update && apt-get install -y libssl-dev libffi-dev gcc libc-dev libxslt-dev zlib1g-dev rustc g++ --no-install-recommends && rm -rf /var/lib/apt/lists/* /var/cache/apt/*
RUN pip3 install --upgrade pip && pip3 install --no-cache-dir -r /tmp/requirements.txt
# More bloat, curl above is needed because the rust compiler is needed
@ -26,6 +30,7 @@ ENV PYTHONUNBUFFERED=1
# Attempt to store the triggered commit
ARG SOURCE_COMMIT
ARG SOURCE_BRANCH
RUN apt-get remove rustc *-dev --purge -y
RUN echo "commit: $SOURCE_COMMIT branch: $SOURCE_BRANCH" >/source.txt
CMD [ "python", "./changedetection.py" , "-d", "/datastore"]

Loading…
Cancel
Save