mirror of
https://github.com/Xevion/dynamic-preauth.git
synced 2025-12-14 22:11:31 -06:00
Setup cross platform builds for windows
This commit is contained in:
14
Dockerfile
14
Dockerfile
@@ -2,9 +2,18 @@
|
||||
FROM rust:latest AS builder-demo
|
||||
|
||||
WORKDIR /build/demo
|
||||
RUN apt update && apt install -y g++-mingw-w64-x86-64
|
||||
|
||||
|
||||
RUN rustup target add x86_64-pc-windows-gnu
|
||||
RUN rustup target add x86_64-unknown-linux-gnu
|
||||
# RUN rustup target add x86_64-apple-darwin
|
||||
|
||||
COPY ./demo ./
|
||||
RUN cargo build --release
|
||||
|
||||
RUN cargo build --release --target x86_64-pc-windows-gnu
|
||||
RUN cargo build --release --target x86_64-unknown-linux-gnu
|
||||
# RUN cargo build --release --target x86_64-apple-darwin
|
||||
|
||||
# Build the server application
|
||||
FROM rust:alpine AS builder-server
|
||||
@@ -21,7 +30,8 @@ FROM alpine:latest
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY --from=builder-demo /build/demo/target/release/demo ./demo
|
||||
COPY --from=builder-demo /build/demo/target/x86_64-pc-windows-gnu/release/demo ./demo-windows.exe
|
||||
COPY --from=builder-demo /build/demo/target/x86_64-unknown-linux-gnu/release/demo ./demo-linux
|
||||
COPY --from=builder-server /build/server/target/release/dynamic-preauth ./dynamic-preauth
|
||||
|
||||
EXPOSE 5800
|
||||
|
||||
Reference in New Issue
Block a user