forked from shadowsocks/go-shadowsocks2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (29 loc) · 1.56 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
36
# FROM golang:1.17-alpine3.15 AS builder
# ENV GO111MODULE on
#ENV GOPROXY https://goproxy.cn
# RUN apk update \
# && apk add git \
# && go get github.com/shadowsocks/go-shadowsocks2 \
# && go get github.com/shadowsocks/[email protected]
FROM quay.io/llrealm/baseutil:main
#LABEL maintainer="mritd <[email protected]>"
USER 0
ARG gbin="https://github.com/ginuerzh/gost/releases/download/v2.12.0/gost_2.12.0_linux_amd64.tar.gz"
ARG rbin="https://github.com/shadowsocks/shadowsocks-rust/releases/download/v1.22.0/shadowsocks-v1.22.0.x86_64-unknown-linux-musl.tar.xz"
ARG kbin="https://github.com/xtaci/kcptun/releases/download/v20210922/kcptun-linux-amd64-20210922.tar.gz"
ARG vbin="https://github.com/shadowsocks/v2ray-plugin/releases/download/v1.3.2/v2ray-plugin-linux-amd64-v1.3.2.tar.gz"
RUN apk update && apk --no-cache add coreutils tzdata \
&& apk --no-cache add --virtual devs gzip tar xz \
&& cd /tmp && curl -L -J ${gbin} | tar -C /usr/local/ -xz \
&& curl -s -L -J ${rbin} | tar -C /usr/bin/ -xJ \
&& curl -s -L -J ${kbin} | tar -C /usr/local/ -xz \
&& ln -s /usr/bin/server_linux_amd64 /usr/bin/kts \
&& ln -s /usr/bin/client_linux_amd64 /usr/bin/ktc \
&& curl -L -J ${vbin} | tar -C /usr/bin/ -xz \
&& ln -s /usr/bin/v2ray-plugin_linux_amd64 /usr/bin/v2ray \
&& apk del --purge devs \
&& apk del --purge openssh-client wget \
&& rm -rf /var/cache/apk/*
# COPY --from=builder /go/bin/go-shadowsocks2 /usr/bin/shadowsocks
#COPY --from=builder /go/bin/v2ray-plugin /usr/bin/v2ray
CMD ["/usr/bin/tail", "-f", "/dev/null"]