TypeDialog/.woodpecker/Dockerfile.minimal

54 lines
1.5 KiB
Docker
Raw Normal View History

# Minimal Docker image for Woodpecker CI (without Nushell)
# Build time: ~2 min
# Size: ~1.6GB (vs 1.68GB with nu, vs 2.47GB original)
#
# Build: docker build -t your-registry/typedialog-ci:minimal -f .woodpecker/Dockerfile.minimal .
FROM rust:1.92-slim
# Install system dependencies
RUN apt-get update && apt-get install -y \
shellcheck \
curl \
git \
ca-certificates \
wget \
xz-utils \
&& rm -rf /var/lib/apt/lists/*
# Install Rust components
RUN rustup component add clippy rustfmt
# Install just (pre-compiled)
RUN curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to /usr/local/bin
# Install cargo-binstall for faster binary installations
RUN curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
# Install Rust tools using pre-compiled binaries (much faster, smaller)
RUN cargo binstall --no-confirm \
cargo-audit \
cargo-deny \
cargo-sbom
# Install nickel only (skip nu to save 46MB + build time)
RUN cargo install --locked nickel-lang-cli
# Clean up cargo cache to reduce size
RUN rm -rf /usr/local/cargo/registry \
&& rm -rf /usr/local/cargo/git
# Set working directory
WORKDIR /workspace
# Verify installations
RUN just --version && \
cargo --version && \
cargo audit --version && \
cargo deny --version && \
cargo sbom --version && \
nickel --version
# Note: nu (Nushell) NOT installed to save space
# To use this image, disable lint-nushell in .woodpecker/ci.yml