RoadSign/Dockerfile

18 lines
334 B
Docker
Raw Normal View History

2023-11-18 13:18:30 +00:00
# Building Backend
2024-02-13 12:48:40 +00:00
FROM rust:alpine as roadsign-server
2023-11-18 13:18:30 +00:00
RUN apk add libressl-dev build-base
2023-11-18 13:18:30 +00:00
WORKDIR /source
COPY . .
ENV RUSTFLAGS="-C target-feature=-crt-static"
2024-02-13 12:48:40 +00:00
RUN cargo build --release
2023-11-18 13:18:30 +00:00
# Runtime
2024-02-13 12:48:40 +00:00
FROM alpine:latest
2023-11-18 13:18:30 +00:00
2024-02-13 12:48:40 +00:00
COPY --from=roadsign-server /source/target/release/roadsign /roadsign/server
2023-11-18 13:18:30 +00:00
EXPOSE 81
CMD ["/roadsign/server"]