mirror of
https://codeberg.org/Toasterson/solstice-ci.git
synced 2026-04-10 13:20:41 +00:00
- Use `sharing=locked` for cargo build cache mounts across multiple Containerfiles to improve caching efficiency. - Upgrade Traefik to version 3.6 and add support for `DOCKER_API_VERSION` for Podman compatibility. - Extend `.env.sample` with GitHub integration variables and update `.gitignore` with new secrets. - Document GitHub App configuration and webhook integration in Podman README. - Update `github-integration` compose service with environment variables for webhook secret, app ID, key, and API base. Signed-off-by: Till Wegmueller <toasterson@gmail.com>
25 lines
1.1 KiB
Docker
25 lines
1.1 KiB
Docker
# syntax=docker/dockerfile:1.7
|
|
# Build Solstice Forge Integration using upstream official images (no sccache)
|
|
|
|
FROM docker.io/library/rust:bookworm AS builder
|
|
ENV CARGO_HOME=/cargo
|
|
WORKDIR /work
|
|
# Install protoc for tonic/prost builds
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends protobuf-compiler ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
# Configure cargo target-dir so it can be cached between layers
|
|
RUN mkdir -p /cargo && printf "[build]\ntarget-dir = \"/cargo/target\"\n" > /cargo/config.toml
|
|
COPY Cargo.toml ./
|
|
COPY crates ./crates
|
|
RUN --mount=type=cache,target=/cargo/registry,sharing=locked \
|
|
--mount=type=cache,target=/cargo/git,sharing=locked \
|
|
--mount=type=cache,target=/cargo/target,sharing=locked \
|
|
cargo build --release -p forge-integration && cp /cargo/target/release/forge-integration /forge-integration
|
|
|
|
FROM docker.io/library/debian:bookworm-slim
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates \
|
|
&& rm -rf /var/lib/apt/lists/*
|
|
COPY --from=builder /forge-integration /usr/local/bin/forge-integration
|
|
ENTRYPOINT ["/usr/local/bin/forge-integration"]
|