mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 15:45:53 +01:00
This drains nontrivial logic out GHA and into something isolated via containers and driven via `Justfile` and easily replicable locally too. Signed-off-by: Colin Walters <walters@verbum.org>
34 lines
926 B
Docker
34 lines
926 B
Docker
FROM registry.access.redhat.com/ubi10/ubi:latest
|
|
# An intermediate layer which caches the RPMS
|
|
RUN <<EORUN
|
|
set -xeuo pipefail
|
|
dnf -y install cargo rust jq unzip
|
|
dnf clean all
|
|
EORUN
|
|
# See main Dockerfile for rust caching
|
|
RUN --mount=type=cache,target=/src/target --mount=type=cache,target=/var/roothome <<EORUN
|
|
set -xeuo pipefail
|
|
|
|
# Bootstrap cargo-binstall
|
|
export PATH=$HOME/.cargo/bin:$PATH
|
|
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
|
|
|
deps=(mdbook@0.4.52
|
|
mdbook-mermaid@0.16.0
|
|
mdbook-linkcheck@0.7.7
|
|
mdbook_header_footer@0.0.3)
|
|
cargo binstall --no-confirm ${deps[@]}
|
|
mv ~/.cargo/bin/* /usr/bin/
|
|
|
|
EORUN
|
|
# And now actually build the docs
|
|
WORKDIR /src
|
|
COPY . /src
|
|
RUN <<EORUN
|
|
set -xeuo pipefail
|
|
mdbook-mermaid install .
|
|
mdbook build
|
|
EORUN
|
|
CMD ["mdbook", "serve", "-n", "0.0.0.0", "-p", "8000"]
|
|
EXPOSE 8000
|