-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathDockerfile
51 lines (40 loc) · 1.82 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# This dockerfile uses the ubuntu image
# VERSION 1 - EDITION 1
# Author: Yale Huang
# Command format: Instruction [arguments / command] ..
# Base image to use, this must be set as the first line
FROM alpine:edge
LABEL maintainer="Yale Huang <calvino.huang@gmail.com>"
# Build arguments
ARG BUILD_DATE
ARG VCS_REF
ARG NAME
# Basic build-time metadata as defined at http://label-schema.org
LABEL org.label-schema.build-date=$BUILD_DATE \
org.label-schema.docker.dockerfile="/Dockerfile" \
org.label-schema.license="MIT" \
org.label-schema.name=$NAME \
org.label-schema.url="https://github.com/yaleh/kcp-shadowsocks-server" \
org.label-schema.vcs-ref=$VCS_REF \
org.label-schema.vcs-url="https://github.com/yaleh/kcp-shadowsocks-server.git" \
org.label-schema.vcs-type="Git"
RUN apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing \
net-tools pwgen bash runit \
shadowsocks-libev
# Install additional apckages
RUN wget --no-check-certificate -O docker.tgz https://download.docker.com/linux/static/stable/x86_64/docker-20.10.12.tgz && \
tar xvfz docker.tgz && \
cp docker/docker /usr/local/bin && \
rm -rf docker.tgz docker
# Install kcptun
RUN wget -O /root/kcptun-linux-amd64.tar.gz https://github.com/xtaci/kcptun/releases/download/v20210922/kcptun-linux-amd64-20210922.tar.gz && \
mkdir -p /opt/kcptun && cd /opt/kcptun && tar xvfz /root/kcptun-linux-amd64.tar.gz && \
rm -rf /root/shadowsocks-libev /root/kcptun-linux-amd64.tar.gz
COPY service /etc/service
COPY kcp_ss_lib bootstrap show runit_bootstrap /usr/local/bin/
ENV SS_METHOD=aes-256-gcm \
KCPTUN_CRYPT=aes KCPTUN_MTU=1350 KCPTUN_MODE=normal \
KCPTUN_SNDWND=4096 KCPTUN_CLIENT_SNDWND=1024 KCPTUN_RCVWND=8192 \
KCPTUN_DATASHARD=35 KCPTUN_PARITYSHARD=15
EXPOSE 41111/udp 8338
CMD ["/usr/local/bin/runit_bootstrap"]