2026-09-05 09:41:44 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
2026-09-03 12:46:14 +00:00
|
|
|
FROM rust:1-bookworm AS build
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
COPY Cargo.toml Cargo.lock ./
|
|
|
|
|
COPY crates crates
|
|
|
|
|
COPY migrations migrations
|
2026-09-05 09:41:44 +00:00
|
|
|
RUN --mount=type=cache,target=/usr/local/cargo/registry,sharing=locked \
|
|
|
|
|
--mount=type=cache,target=/src/target,id=lazyboy-supervisor-release,sharing=locked \
|
|
|
|
|
cargo build --locked --release -p lazyboy-supervisor && cp /src/target/release/lazyboy-supervisor /lazyboy-supervisor
|
2026-09-03 12:46:14 +00:00
|
|
|
|
2026-09-05 09:41:44 +00:00
|
|
|
FROM gcr.io/distroless/cc-debian12:latest
|
|
|
|
|
COPY --from=build /lazyboy-supervisor /usr/local/bin/lazyboy-supervisor
|
2026-09-03 12:46:14 +00:00
|
|
|
EXPOSE 7091
|
2026-09-05 09:41:44 +00:00
|
|
|
CMD ["/usr/local/bin/lazyboy-supervisor"]
|