stargate/Dockerfile.rich

24 lines
578 B
Text
Raw Permalink Normal View History

2025-10-27 08:58:56 -05:00
# build the executable in its own stage. rust is big
2026-01-30 12:48:21 -06:00
FROM rust:alpine3.23 AS builder
2025-08-22 12:55:55 -05:00
WORKDIR /usr/src/stargate
2025-10-27 08:58:56 -05:00
# install build dependencies
2025-08-22 12:59:48 -05:00
RUN apk add musl-dev
2025-08-22 12:55:55 -05:00
COPY . .
RUN cargo install --features rich --path .
2025-10-27 08:58:56 -05:00
# final image
2026-01-30 12:42:41 -06:00
FROM alpine:3.23
2025-10-27 08:58:56 -05:00
# copy executable from builder image
2025-08-22 12:58:11 -05:00
COPY --from=builder /usr/local/cargo/bin/stargate /usr/local/bin/stargate
2025-08-22 12:55:55 -05:00
2025-10-27 08:58:56 -05:00
# set working directory to /etc/stargate, config file should be included here
2025-08-22 12:55:55 -05:00
WORKDIR /etc/stargate
2025-10-27 08:58:56 -05:00
# include tera templates. TODO: figure out how to include at compile time
2025-08-22 13:49:03 -05:00
COPY templates templates
2025-10-27 08:58:56 -05:00
CMD ["stargate"]