-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (20 loc) · 963 Bytes
/
Dockerfile
File metadata and controls
31 lines (20 loc) · 963 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM rust:1.77.1-buster@sha256:14760dfe76902fed117bb1e7ee75709c34ce03652982225cdfe60c8f95193f94 as builder
WORKDIR /build
RUN git clone https://github.com/TeamFlos/phira-mp.git .
COPY ./fixed_port.patch /build/
RUN patch -p1 -li fixed_port.patch && \
cargo build --release -p phira-mp-server && \
ls target/release/
FROM debian:bullseye-slim@sha256:e831d9a884d63734fe3dd9c491ed9a5a3d4c6a6d32c5b14f2067357c49b0b7e1 as libenv
WORKDIR /libenv
RUN ARCH=$([ "$(uname -m)" = "x86_64" ] && echo "x86_64" || echo "aarch64") && \
mkdir ${ARCH}-linux-gnu && \
cp /lib/${ARCH}-linux-gnu/libgcc_s.so.1 ${ARCH}-linux-gnu && \
ls ${ARCH}-linux-gnu
FROM gcr.io/distroless/base-debian11:nonroot@sha256:68b0f492c1eb077f71d384b544456dac4afb282372966917df32b3923f65ad0d
WORKDIR /app
COPY --from=builder /build/target/release/phira-mp-server /app/
COPY --from=libenv /libenv/ /lib/
ENV RUST_LOG=info
ENV PORT=12346
ENTRYPOINT [ "/app/phira-mp-server" ]