stargate/Dockerfile

21 lines
458 B
Text
Raw Normal View History

2025-10-27 08:58:56 -05:00
# build the executable in its own stage. rust is big
2025-08-22 12:55:55 -05:00
FROM rust:alpine AS builder
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 --path .
2025-10-27 08:58:56 -05:00
# final image
2025-08-22 12:55:55 -05:00
FROM alpine:3.22
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
CMD ["stargate"]