mirror of
https://github.com/aphrody-labs/mullvadvpn-app.git
synced 2026-10-13 22:10:39 +00:00
Fix container setup order
Ensures basic packages such as curl are available for other layers.
This commit is contained in:
2 files changed
+19
-12
No files matched your search
@@ -18,16 +18,12 @@ LABEL org.opencontainers.image.source=https://github.com/mullvad/mullvadvpn-app
|
||||
LABEL org.opencontainers.image.description="Mullvad VPN app Android build container"
|
||||
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later
|
||||
|
||||
# === Common setup ===
|
||||
# === Configure snapshot ===
|
||||
|
||||
ARG DEBIAN_SNAPSHOT=20260927T000000Z
|
||||
COPY building/setup-debian-snapshot.sh /tmp/
|
||||
RUN /tmp/setup-debian-snapshot.sh && rm /tmp/setup-debian-snapshot.sh
|
||||
|
||||
COPY building/install-rust.sh rust-toolchain.toml /tmp/rust/
|
||||
RUN /tmp/rust/install-rust.sh android && rm -r /tmp/rust
|
||||
ENV PATH=/root/.cargo/bin:$PATH
|
||||
|
||||
# === Define toolchain versions ===
|
||||
|
||||
ARG SDK_VERSION=android-37.0 \
|
||||
@@ -85,7 +81,7 @@ ${JAVA_HOME}/bin\
|
||||
:${ANDROID_SDK_ROOT}/cmdline-tools/latest/bin\
|
||||
:${PATH}"
|
||||
|
||||
# === Install/set up the image ===
|
||||
# === Install base packages ===
|
||||
|
||||
RUN apt-get update -y && apt-get install -y \
|
||||
file \
|
||||
@@ -108,6 +104,14 @@ RUN apt-get update -y && apt-get install -y \
|
||||
&& apt-get install -y --no-install-recommends fdroidserver \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# === Install rust ===
|
||||
|
||||
COPY building/install-rust.sh rust-toolchain.toml /tmp/rust/
|
||||
RUN /tmp/rust/install-rust.sh android && rm -r /tmp/rust
|
||||
ENV PATH=/root/.cargo/bin:$PATH
|
||||
|
||||
# === Install Android packages ===
|
||||
|
||||
# Install Android command line tools
|
||||
RUN curl -sfLo /tmp/cmdline-tools.zip https://dl.google.com/android/repository/commandlinetools-linux-${COMMAND_LINE_TOOLS_VERSION}_latest.zip && \
|
||||
echo "$COMMAND_LINE_TOOLS_SHA256_CHECKSUM /tmp/cmdline-tools.zip" | sha256sum -c && \
|
||||
@@ -130,6 +134,8 @@ RUN mkdir -p ${ANDROID_SDK_ROOT}/ndk && \
|
||||
mv /tmp/android-ndk-${NDK_VERSION_NAME} ${ANDROID_NDK_HOME} && \
|
||||
rm /tmp/ndk.zip
|
||||
|
||||
# === Configure for signing ===
|
||||
|
||||
COPY android/docker/pkcs11_java.cfg /usr/local/etc/pkcs11_java.cfg
|
||||
# Keep ykcs11 at the path used by pkcs11_java.cfg and existing override configs
|
||||
RUN ln -s /usr/lib/x86_64-linux-gnu/libykcs11.so.2 /usr/local/lib/libykcs11.so.2
|
||||
|
||||
+7
-6
@@ -25,7 +25,7 @@ LABEL org.opencontainers.image.source=https://github.com/mullvad/mullvadvpn-app
|
||||
LABEL org.opencontainers.image.description="Mullvad VPN app Linux build container"
|
||||
LABEL org.opencontainers.image.licenses=GPL-3.0-or-later
|
||||
|
||||
# === Common setup ===
|
||||
# === Configure snapshot ===
|
||||
|
||||
# Install packages from a fixed point in time on snapshot.debian.org, so that every build of
|
||||
# this image installs the exact same package versions. This helps make the image reproducible.
|
||||
@@ -36,11 +36,7 @@ ARG DEBIAN_SNAPSHOT=20260901T000000Z
|
||||
COPY building/setup-debian-snapshot.sh /tmp/
|
||||
RUN /tmp/setup-debian-snapshot.sh && rm /tmp/setup-debian-snapshot.sh
|
||||
|
||||
COPY building/install-rust.sh rust-toolchain.toml /tmp/rust/
|
||||
RUN /tmp/rust/install-rust.sh linux && rm -r /tmp/rust
|
||||
ENV PATH=/root/.cargo/bin:$PATH
|
||||
|
||||
# === Install/set up the image ===
|
||||
# === Install base packages ===
|
||||
|
||||
RUN dpkg --add-architecture arm64 && apt-get update -y && apt-get install -y \
|
||||
git \
|
||||
@@ -58,6 +54,11 @@ RUN dpkg --add-architecture arm64 && apt-get update -y && apt-get install -y \
|
||||
libarchive-tools \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# === Install rust ===
|
||||
COPY building/install-rust.sh rust-toolchain.toml /tmp/rust/
|
||||
RUN /tmp/rust/install-rust.sh linux && rm -r /tmp/rust
|
||||
ENV PATH=/root/.cargo/bin:$PATH
|
||||
|
||||
# Rust cross-compilation for: aarch64
|
||||
ENV CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER="aarch64-linux-gnu-gcc" \
|
||||
PKG_CONFIG_SYSROOT_DIR_aarch64_unknown_linux_gnu=/usr/lib/aarch64-linux-gnu
|
||||
|
||||
Reference in new issue
Block a user