-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
35 lines (26 loc) · 1.25 KB
/
Dockerfile
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
FROM --platform=$BUILDPLATFORM debian:sid-slim
ARG TARGETPLATFORM
ARG BUILDPLATFORM
ARG SNELL_SERVER_VERSION=4.0.1
RUN apt-get update && \
apt-get install -y --no-install-recommends wget unzip && \
rm -rf /var/lib/apt/lists/*
WORKDIR /app/
RUN case "${TARGETPLATFORM}" in \
"linux/amd64") wget --no-check-certificate -O snell.zip "https://dl.nssurge.com/snell/snell-server-v${SNELL_SERVER_VERSION}-linux-amd64.zip" ;; \
"linux/arm64") wget --no-check-certificate -O snell.zip "https://dl.nssurge.com/snell/snell-server-v${SNELL_SERVER_VERSION}-linux-aarch64.zip" ;; \
"linux/arm/v7") wget --no-check-certificate -O snell.zip "https://dl.nssurge.com/snell/snell-server-v${SNELL_SERVER_VERSION}-linux-armv7l.zip" ;; \
"linux/386") wget --no-check-certificate -O snell.zip "https://dl.nssurge.com/snell/snell-server-v${SNELL_SERVER_VERSION}-linux-i386.zip" ;; \
*) echo "unsupported platform: ${TARGETPLATFORM}"; exit 1 ;; \
esac
COPY entrypoint.sh /app/
RUN if [ -f snell.zip ]; then unzip snell.zip && rm -f snell.zip; fi && \
chmod +x snell-server && \
chmod +x entrypoint.sh
ENV LANG=C.UTF-8
ENV TZ=Asia/Shanghai
ENV PORT=6180
ENV IPV6=false
ENV PSK=
LABEL version="${SNELL_SERVER_VERSION}"
ENTRYPOINT ["/app/entrypoint.sh"]