forked from WeblateOrg/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
That seems to workaround rust-lang/cargo#8719.
- Loading branch information
Showing
2 changed files
with
14 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,10 @@ FROM debian:bullseye-20211115-slim | |
ENV VERSION 4.9.1 | ||
ARG TARGETARCH | ||
|
||
# Workaround for https://github.com/rust-lang/cargo/issues/8719, | ||
# see below in the Dockerfile and .github/bin/get-buildx-args as well | ||
# syntax = docker/dockerfile:experimental | ||
|
||
LABEL name="Weblate" | ||
LABEL version=$VERSION | ||
LABEL maintainer="Michal Čihař <[email protected]>" | ||
|
@@ -46,6 +50,10 @@ ENV PYTHONUNBUFFERED=1 | |
|
||
COPY requirements.txt patches /usr/src/weblate/ | ||
|
||
# Workaround for https://github.com/rust-lang/cargo/issues/8719, | ||
# see top Dockerfile and .github/bin/get-buildx-args as well | ||
RUN mkdir -p /root/.cargo && chmod 777 /root/.cargo && mount -t tmpfs none /root/.cargo | ||
|
||
# Install dependencies | ||
# hadolint ignore=DL3008,DL3013,SC2046 | ||
RUN \ | ||
|
@@ -110,11 +118,6 @@ RUN \ | |
fi \ | ||
&& curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y \ | ||
&& source $HOME/.cargo/env \ | ||
# Handle an extremely specific issue when building the cryptography package for \ | ||
# 32-bit architectures within QEMU running on a 64-bit host (issue #30). \ | ||
&& if [ "${BUILDX_QEMU_ENV}" = "true" -a "$(getconf LONG_BIT)" = "32" ] ; then \ | ||
sed -i s/^cryptography==/cryptography==3.3.2/ /usr/src/weblate/requirements.txt ; \ | ||
fi \ | ||
&& python3 -m pip install --no-cache-dir --upgrade $(grep -E '^(pip|wheel|setuptools)==' /usr/src/weblate/requirements.txt) \ | ||
&& python3 -m pip install --no-cache-dir --no-binary :all: $(grep ^cffi== /usr/src/weblate/requirements.txt) \ | ||
&& case "$VERSION" in \ | ||
|
@@ -159,7 +162,8 @@ RUN \ | |
&& apt-get -y autoremove \ | ||
&& apt-get clean \ | ||
&& rustup self uninstall -y \ | ||
&& rm -rf /root/.cache /tmp/* /var/lib/apt/lists/* | ||
&& rm -rf /root/.cache /tmp/* /var/lib/apt/lists/* \ | ||
&& umount /root/.cargo && rmdir /root/.cargo | ||
|
||
# Apply hotfixes on Weblate | ||
RUN find /usr/src/weblate -name '*.patch' -print0 | sort -z | \ | ||
|