From 0cf0c1f4e256c47d7803c1193ef355c8349d5897 Mon Sep 17 00:00:00 2001 From: foxfire52 Date: Wed, 27 Nov 2024 21:57:19 +0100 Subject: [PATCH] Fix docker armv7 cryptography module build (#2436) * Update Dockerfile-armv7 --- docker/Dockerfile-armv7 | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile-armv7 b/docker/Dockerfile-armv7 index 0a28ee6e..9cd19e35 100644 --- a/docker/Dockerfile-armv7 +++ b/docker/Dockerfile-armv7 @@ -11,9 +11,9 @@ ENV G4F_USER_ID $G4F_USER_ID ENV G4F_DIR /app RUN apt-get update && apt-get upgrade -y \ - && apt-get install -y git \ + && apt-get install -y git curl \ && apt-get install --quiet --yes --no-install-recommends \ - build-essential libffi-dev zlib1g-dev libjpeg-dev \ + build-essential libffi-dev zlib1g-dev libjpeg-dev libssl-dev pkg-config \ # Add user and user group && groupadd -g $G4F_USER_ID $G4F_USER \ && useradd -rm -G sudo -u $G4F_USER_ID -g $G4F_USER_ID $G4F_USER \ @@ -26,7 +26,10 @@ USER $G4F_USER_ID WORKDIR $G4F_DIR ENV HOME /home/$G4F_USER -ENV PATH "${HOME}/.local/bin:${PATH}" +ENV PATH "${HOME}/.local/bin:${HOME}/.cargo/bin:${PATH}" + +# Install rust toolchain +RUN curl https://sh.rustup.rs -sSf | bash -s -- -y # Create app dir and copy the project's requirements file into it RUN mkdir -p $G4F_DIR @@ -56,6 +59,7 @@ RUN pip uninstall --yes \ USER root # Clean up build deps +RUN rm --recursive --force "${HOME}/.rustup" RUN apt-get purge --auto-remove --yes \ build-essential \ && apt-get clean \