15 lines
504 B
Docker
15 lines
504 B
Docker
|
|
FROM rust:1.86 AS builder
|
||
|
|
WORKDIR /build
|
||
|
|
|
||
|
|
# Configure Sunbeam Cargo registry (Gitea) — anonymous read access
|
||
|
|
RUN mkdir -p /usr/local/cargo/registry && \
|
||
|
|
printf '[registries.sunbeam]\nindex = "sparse+https://src.sunbeam.pt/api/packages/studio/cargo/"\n' \
|
||
|
|
>> /usr/local/cargo/config.toml
|
||
|
|
|
||
|
|
COPY . .
|
||
|
|
RUN cargo build --release --target x86_64-unknown-linux-gnu
|
||
|
|
|
||
|
|
FROM gcr.io/distroless/cc-debian12:nonroot
|
||
|
|
COPY --from=builder /build/target/x86_64-unknown-linux-gnu/release/sol /
|
||
|
|
ENTRYPOINT ["/sol"]
|