diff --git a/tools/docker/Dockerfile b/tools/docker/Dockerfile
index b804df03e16..71932e5433c 100644
--- a/tools/docker/Dockerfile
+++ b/tools/docker/Dockerfile
@@ -315,6 +315,16 @@ RUN echo uboot ALL=NOPASSWD: ALL > /etc/sudoers.d/uboot
 RUN useradd -m -U uboot
 USER uboot:uboot
 
+# Install Rust toolchain with cross-compilation targets for ulib examples
+RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
+	sh -s -- -y --default-toolchain stable --profile minimal && \
+	. $HOME/.cargo/env && \
+	rustup target add \
+		aarch64-unknown-none \
+		i686-unknown-linux-gnu \
+		riscv64gc-unknown-none-elf \
+		x86_64-unknown-none
+ENV PATH="/home/uboot/.cargo/bin:${PATH}"
 
 # Populate the cache for pip to use. Get these via wget as the
 # COPY / ADD directives don't work as we need them to.
