summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLinus Färnstrand <linus@mullvad.net>2023-02-09 09:38:08 +0100
committerLinus Färnstrand <linus@mullvad.net>2023-02-09 09:38:08 +0100
commit20d7550f1e8ab2e43dd9513177637da361fe95a3 (patch)
tree76338ff1169cc7dc4b5254aa6f31ed13bc7bbf14
parent5afa6f1fac79fa2abdf212c8928feac1b4e0e030 (diff)
parent82efd490f177d8890e19d8f20c60a87385bf7a31 (diff)
downloadmullvadvpn-20d7550f1e8ab2e43dd9513177637da361fe95a3.tar.xz
mullvadvpn-20d7550f1e8ab2e43dd9513177637da361fe95a3.zip
Merge branch 'linux-container-add-clippy-windows'
-rw-r--r--android/docker/Dockerfile2
-rw-r--r--building/Dockerfile16
2 files changed, 13 insertions, 5 deletions
diff --git a/android/docker/Dockerfile b/android/docker/Dockerfile
index 3183f4bf92..a859ed16c6 100644
--- a/android/docker/Dockerfile
+++ b/android/docker/Dockerfile
@@ -1,4 +1,4 @@
-# To build the image:
+# To build the image (executed from this Dockerfile directory):
# podman build . -t mullvadvpn-app-build-android
#
# To build using the image:
diff --git a/building/Dockerfile b/building/Dockerfile
index e036834cc1..0e9b5402d8 100644
--- a/building/Dockerfile
+++ b/building/Dockerfile
@@ -1,5 +1,5 @@
-# To build the image:
-# podman build . -t mullvadvpn-app-build
+# To build the image (executed from the repository root):
+# podman build -f building/Dockerfile . -t mullvadvpn-app-build
#
# To run the image and build the app you need to mount the app's source directory into the
# container. You also probably want to mount in a directory for CARGO_HOME, so each container
@@ -38,13 +38,21 @@ RUN dpkg --add-architecture arm64 && apt-get update -y && apt-get install -y \
libdbus-1-dev libdbus-1-dev:arm64 \
rpm \
protobuf-compiler \
+ # For cross-compiling/linting towards Windows
+ gcc-mingw-w64-x86-64 \
&& rm -rf /var/lib/apt/lists/*
# === Rust ===
-# Install latest stable Rust toolchain for both x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu
+# Install latest stable Rust toolchain for both x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu,
+# plus x86_64-pc-windows-gnu for Windows cross-compilation/linting
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
- sh -s -- --default-toolchain stable --profile minimal --target aarch64-unknown-linux-gnu -y
+ sh -s -- -y \
+ --default-toolchain stable \
+ --profile minimal \
+ --component clippy \
+ --target aarch64-unknown-linux-gnu \
+ --target x86_64-pc-windows-gnu
ENV PATH=/root/.cargo/bin:$PATH
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc" \