diff --git a/test/Dockerfile b/test/Dockerfile index 59aa5bb7764b..23dcdc4b5b7e 100644 --- a/test/Dockerfile +++ b/test/Dockerfile @@ -1,6 +1,2 @@ -FROM debian:stable - -RUN apt-get update && apt-get install -y \ - gcc curl libdbus-1-dev protobuf-compiler -RUN curl https://sh.rustup.rs -sSf | sh -s -- -y -ENV PATH="/root/.cargo/bin:${PATH}" +ARG IMAGE=ghcr.io/mullvad/mullvadvpn-app-build:latest +FROM $IMAGE diff --git a/test/build.sh b/test/build.sh index 8832d931ab69..3c598ed4e7a2 100755 --- a/test/build.sh +++ b/test/build.sh @@ -3,15 +3,17 @@ set -eu SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" +APP_DIR="$SCRIPT_DIR/.." cd "$SCRIPT_DIR" if [[ $TARGET == x86_64-unknown-linux-gnu ]]; then mkdir -p .container/cargo-registry - podman build -t mullvadvpn-app-tests . + container_image=$(cat "$APP_DIR/building/linux-container-image.txt") + podman build -t mullvadvpn-app-tests --build-arg IMAGE="${container_image}" . podman run --rm -it \ -v "${SCRIPT_DIR}/.container/cargo-registry":/root/.cargo/registry \ - -v "${SCRIPT_DIR}/..":/src:Z \ + -v "${APP_DIR}":/src:Z \ -e CARGO_HOME=/root/.cargo/registry \ mullvadvpn-app-tests \ /bin/bash -c "cd /src/test/; cargo build --bin test-runner --release --target ${TARGET}"