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
|
|
|
|
2024-02-13 13:03:33 +00:00
|
|
|
RUN apk add libressl-dev build-base
|
2024-01-01 10:16:57 +00:00
|
|
|
|
2023-11-18 13:18:30 +00:00
|
|
|
WORKDIR /source
|
|
|
|
COPY . .
|
2024-02-13 13:03:33 +00:00
|
|
|
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"]
|