docker/rust
0 forks
A rust environment for CICD pipeline
id: 3 ยท key: RS
182 Lines
  • Yaml 71.4%
  • Markdown 28.6%
README.md

Rust Tooling Container

This repository builds a reusable Docker image for Rust CI and test workflows.

Purpose

The image is intended to replace the older 1dev/rust:1.03 container with a current environment that supports coverage and nextest-based test execution.

Included Tooling

The Docker image currently provides:

  • Python 3.14
  • Rust stable via rustup
  • llvm-tools-preview, clippy, and rustfmt
  • cargo-nextest
  • cargo-llvm-cov
  • lcov_cobertura
  • system packages required for common Rust builds, including build-essential, curl, pkg-config, libssl-dev, and ca-certificates

It also sets:

  • CARGO_HOME=/root/.cache/cargo
  • PIP_CACHE_DIR=/root/.cache/pip
  • PATH=/root/.cache/cargo/bin:/root/.local/bin:$PATH

Intended Workflow

This image is designed for build steps like:

rustup update
export CARGO_HOME=/root/.cache/cargo
mkdir -p .config
cat << EOF > .config/nextest.toml
[profile.default.junit]
path = "test-result.xml"
store-success-output = true
store-failure-output = true
EOF
cargo llvm-cov nextest --lcov --output-path lcov.info
lcov_cobertura lcov.info -o coverage.xml
chmod -R o+r "$CARGO_HOME"

The runtime workspace configuration, such as .config/nextest.toml, is expected to be created by the consuming job rather than baked into the base image.

Build

docker build -t rust-tooling .
Please wait...
Connection lost or session expired, reload to recover
Page is in error, reload to recover