-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.debian.mips64le
More file actions
43 lines (37 loc) · 1.02 KB
/
Copy pathDockerfile.debian.mips64le
File metadata and controls
43 lines (37 loc) · 1.02 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
# STEP 1 BUILD
FROM --platform=${BUILDPLATFORM} golang:bookworm AS builder
ARG TARGETARCH
ARG TARGETVARIANT
WORKDIR /app
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
git \
make \
cmake
RUN rm -rf /var/lib/apt/lists/*
RUN git clone https://github.com/windtf/wireproxy
RUN export GOOS=linux && \
export GOARCH=${TARGETARCH} && \
if [ "${TARGETARCH}" = "arm" ]; then \
export GOARM=${TARGETVARIANT##*v}; \
else \
unset GOARM; \
fi && \
cd wireproxy && GOFLAGS="-ldflags=-s -ldflags=-w" make
# Smoke test
RUN cd wireproxy && ./wireproxy -h
# STEP 2 RUNTIME
FROM debian:bookworm
WORKDIR /app
COPY --from=builder /app/wireproxy/wireproxy /app/wireproxy/wireproxy
EXPOSE 25565
EXPOSE 25545
EXPOSE 25344
EXPOSE 25345
# Create a non-root user
RUN groupadd -r appgroup && \
useradd -r -g appgroup -m -s /sbin/nologin appuser
USER appuser
VOLUME [ "/app/wireproxy"]
ENTRYPOINT [ "/app/wireproxy/wireproxy" ]
CMD [ "--config", "/app/wireproxy/config" ]