summaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
diff options
context:
space:
mode:
authorMullvad build server <app@mullvad.net>2022-11-01 16:14:23 +0100
committerLinus Färnstrand <linus@mullvad.net>2022-11-30 14:45:46 +0100
commitbb179fae8829547e8b077a844a99cb45ed9410ed (patch)
tree8a2d85bea4bd1e6e172b88ed8364b2852b924d5c /Dockerfile
parent5cb79e2a278c9e7ee94e27f2fa63e1cd83e42f82 (diff)
downloadmullvadvpn-bb179fae8829547e8b077a844a99cb45ed9410ed.tar.xz
mullvadvpn-bb179fae8829547e8b077a844a99cb45ed9410ed.zip
Add initial build-and-publish.sh script and readme for build containers
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile72
1 files changed, 0 insertions, 72 deletions
diff --git a/Dockerfile b/Dockerfile
deleted file mode 100644
index e036834cc1..0000000000
--- a/Dockerfile
+++ /dev/null
@@ -1,72 +0,0 @@
-# To build the image:
-# podman build . -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
-# does not need to start from scratch with cloning the crates.io index, download all
-# dependencies and building everything.
-#
-# podman run --rm \
-# -v /path/to/container_cache/target:/root/.cargo/target:Z \
-# -v /path/to/container_cache/registry:/root/.cargo/registry:Z \
-# -v .:/build:Z \
-# mullvadvpn-app-build ./build.sh
-#
-# And add -e TARGETS="aarch64-unknown-linux-gnu" to build for ARM64
-
-# Debian 10 is the oldest supported distro. It has the oldest glibc that we support
-# This checksum points to a 10.13-slim image.
-FROM debian@sha256:557ee531b81ce380d012d83b7bb56211572e5d6088d3e21a3caef7d7ed7f718b
-
-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
-
-# === Define toolchain versions and paths ===
-
-ENV CARGO_TARGET_DIR=/root/.cargo/target
-
-ENV GOLANG_VERSION=1.18.5 \
- GOLANG_HASH=9e5de37f9c49942c601b191ac5fba404b868bfc21d446d6960acc12283d6e5f2
-
-# === Install/set up the image ===
-
-RUN dpkg --add-architecture arm64 && apt-get update -y && apt-get install -y \
- git \
- curl \
- gcc gcc-aarch64-linux-gnu \
- libdbus-1-dev libdbus-1-dev:arm64 \
- rpm \
- protobuf-compiler \
- && rm -rf /var/lib/apt/lists/*
-
-# === Rust ===
-
-# Install latest stable Rust toolchain for both x86_64-unknown-linux-gnu and aarch64-unknown-linux-gnu
-RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
- sh -s -- --default-toolchain stable --profile minimal --target aarch64-unknown-linux-gnu -y
-
-ENV PATH=/root/.cargo/bin:$PATH
-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
-
-# === Volta for npm + node ===
-
-ENV PATH=/root/.volta/bin:$PATH
-# volta seemingly does not have a way to explicitly install the toolchain
-# versions from package.json, but `node --version` triggers an install
-COPY gui/package.json .
-RUN curl https://get.volta.sh | bash && node --version && rm package.json
-
-# === Golang ===
-
-# Install golang
-# Checksum from: https://go.dev/dl/
-RUN curl -Lo go.tgz https://go.dev/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz && \
- echo "${GOLANG_HASH} go.tgz" | sha256sum -c - && \
- tar -C /usr/local -xzf go.tgz && \
- rm go.tgz
-ENV PATH=/usr/local/go/bin:$PATH
-
-
-WORKDIR /build