Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#Build container
FROM alpine:latest AS build

RUN apk add --no-cache cargo

RUN mkdir /build
WORKDIR /build
COPY ./ /build

RUN cargo build -r


#Runtime container
FROM alpine:latest

RUN apk add --no-cache libgcc

COPY --from=build --chmod=777 /build/target/release/rust-socket-server /

RUN adduser -D -H netplayserver
USER netplayserver

ENV PORT=4000
EXPOSE 4000/tcp

ENTRYPOINT [ "/rust-socket-server" ]