Fix docker armv7 cryptography module build (#2436)

* Update Dockerfile-armv7
This commit is contained in:
foxfire52 2024-11-27 21:57:19 +01:00 committed by GitHub
parent 9df8e07739
commit 0cf0c1f4e2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 \