mirror of
https://github.com/storytold/autocraft.git
synced 2026-12-01 10:33:55 +01:00
28 lines
1.7 KiB
Docker
28 lines
1.7 KiB
Docker
# Toolchain image "rust-stable" for build pods (kubernetes build environments, docs/operations.md "Build pods").
|
|
# The pods cannot build images or install packages, so this image carries what the craft apps' CI gates commonly
|
|
# install: the windowing, GL/Vulkan, GTK, font, audio and D-Bus development packages, plus clippy and rustfmt. A task
|
|
# whose CI gate names a package missing here fails with that package named.
|
|
#
|
|
# Workspace pods (AUTO-27) use the same image: Xvfb and Mesa's software Vulkan (lavapipe) and GL (llvmpipe) to
|
|
# run the app headless, ImageMagick and x11-utils for screenshots, ripgrep for the grep tool, and fallback fonts
|
|
# so every screenshot shows the same glyphs. Mesa is pinned by the image digest, so before and after shots match.
|
|
#
|
|
# podman build -f deploy/container/Containerfile.rust-stable -t rust-stable deploy/container
|
|
FROM docker.io/library/rust:1-bookworm
|
|
|
|
RUN set -eux; \
|
|
apt-get update; \
|
|
apt-get install -y --no-install-recommends \
|
|
pkg-config libx11-dev libxcb1-dev libxkbcommon-dev libwayland-dev libxrandr-dev libxi-dev libxcursor-dev \
|
|
libgl1-mesa-dev libvulkan1 mesa-vulkan-drivers libgtk-3-dev libfontconfig1-dev libfreetype-dev \
|
|
libasound2-dev libdbus-1-dev poppler-utils qpdf \
|
|
xvfb x11-utils xauth libgl1-mesa-dri imagemagick ripgrep \
|
|
fonts-dejavu-core fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji; \
|
|
rm -rf /var/lib/apt/lists/*; \
|
|
rustup component add clippy rustfmt; \
|
|
rm -rf "$CARGO_HOME/registry" "$CARGO_HOME/git"; \
|
|
chmod -R a+rX /usr/local/rustup /usr/local/cargo
|
|
|
|
# The uid build pods run as (the AutoCraft image's); steps write only to /src, /target, /cache, /out and /tmp.
|
|
USER 10001:10001
|