From e8daae60c07aa62f4b2f86ce72b54b16d4ad2350 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 2 Apr 2026 13:01:22 +0200 Subject: [PATCH 1/3] lifecycle/container: install rustup via apt Signed-off-by: Jens Langhammer --- lifecycle/container/Dockerfile | 3 +-- website/scripts/docsmg/README.md | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lifecycle/container/Dockerfile b/lifecycle/container/Dockerfile index 39c41b1f39d7..397578f464a4 100644 --- a/lifecycle/container/Dockerfile +++ b/lifecycle/container/Dockerfile @@ -111,7 +111,7 @@ RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v # Required for installing pip packages apt-get install -y --no-install-recommends \ # Build essentials - build-essential pkg-config libffi-dev git \ + build-essential pkg-config libffi-dev git rustup \ # cryptography curl \ # libxml @@ -123,7 +123,6 @@ RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/v # xmlsec libltdl-dev && \ export RUST_TOOLCHAIN="$(awk -F'\"' '/^[[:space:]]*channel[[:space:]]*=/{print $2; exit}' rust-toolchain.toml)" && \ - curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain "${RUST_TOOLCHAIN}" && \ rustup default "${RUST_TOOLCHAIN}" && \ rustc --version && \ cargo --version diff --git a/website/scripts/docsmg/README.md b/website/scripts/docsmg/README.md index 357db62f81f2..807bad876608 100644 --- a/website/scripts/docsmg/README.md +++ b/website/scripts/docsmg/README.md @@ -12,7 +12,7 @@ Use this migration tool to: ## Steps to install 1. Verify that you have the latest version of rust installed - - Install [rust](rustup.rs) or update rust to the latest version with `rustup update` + - Install [rust](https://rustup.rs) or update rust to the latest version with `rustup update` - If installing rust from scratch, you may need to run `. $HOME/.cargo/env` 2. Install the cli tool with `cargo install --git https://github.com/goauthentik/authentik --bin docsmg` 3. In the `/website` directory, create a file named `docsmg.env` with the entry of `MIGRATE_PATH=./docs`. From 6a10d1134f6295466c67ac04da4a41d952429d92 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 2 Apr 2026 13:30:02 +0200 Subject: [PATCH 2/3] get rustup from docker image Signed-off-by: Jens Langhammer --- lifecycle/container/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lifecycle/container/Dockerfile b/lifecycle/container/Dockerfile index 397578f464a4..7a81526a4673 100644 --- a/lifecycle/container/Dockerfile +++ b/lifecycle/container/Dockerfile @@ -96,22 +96,24 @@ WORKDIR /ak-root/ COPY --from=uv /uv /uvx /bin/ # Stage 6: Python dependencies +FROM docker.io/library/rust:1.94.1-slim-trixie@sha256:1d0000a49fb62f4fde24455f49d59c6c088af46202d65d8f455b722f7263e8f8 AS rust FROM python-base AS python-deps ARG TARGETARCH ARG TARGETVARIANT +COPY --from=rust /usr/local/cargo/bin/rustup /usr/bin/rustup RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache ENV PATH="/root/.cargo/bin:$PATH" RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \ - --mount=type=bind,target=rust-toolchain.toml,src=rust-toolchain.toml \ + --mount=type=bind,target=rut-toolchain.toml,src=rust-toolchain.toml \ apt-get update && \ # Required for installing pip packages apt-get install -y --no-install-recommends \ # Build essentials - build-essential pkg-config libffi-dev git rustup \ + build-essential pkg-config libffi-dev git \ # cryptography curl \ # libxml From e85dbb5ca602af727adef8513d4d3aab1fe9bf88 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 2 Apr 2026 13:33:03 +0200 Subject: [PATCH 3/3] typo Signed-off-by: Jens Langhammer --- lifecycle/container/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lifecycle/container/Dockerfile b/lifecycle/container/Dockerfile index 7a81526a4673..4d7e4436a599 100644 --- a/lifecycle/container/Dockerfile +++ b/lifecycle/container/Dockerfile @@ -108,7 +108,7 @@ RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloa ENV PATH="/root/.cargo/bin:$PATH" RUN --mount=type=cache,id=apt-$TARGETARCH$TARGETVARIANT,sharing=locked,target=/var/cache/apt \ - --mount=type=bind,target=rut-toolchain.toml,src=rust-toolchain.toml \ + --mount=type=bind,target=rust-toolchain.toml,src=rust-toolchain.toml \ apt-get update && \ # Required for installing pip packages apt-get install -y --no-install-recommends \