forked from wnxd/docker-v2ray
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
56 lines (45 loc) · 1.12 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
52
53
54
55
56
FROM golang:latest as builder
LABEL MAINTAINER="wnxd <imiku@wnxd.me>"
RUN go get -u v2ray.com/core/...
RUN go get -u v2ray.com/ext/...
RUN go install v2ray.com/ext/tools/build/vbuild
RUN vbuild -dir /usr/bin/v2ray
FROM alpine:latest
COPY --from=builder /usr/bin/v2ray /usr/bin/v2ray
COPY config.json /etc/v2ray/config.json
COPY entrypoint.sh /usr/bin/entrypoint.sh
RUN set -ex && \
apk --no-cache upgrade && \
apk --no-cache add \
bash \
ca-certificates \
openssh-server && \
rm -rf /var/cache/apk/* && \
ssh-keygen -A && \
mkdir /var/log/v2ray/
ENV ROOT_PASSWORD=alpine
# ssh
ENV SSH_PORT=7777
# ss
ENV SS_PORT=8888
ENV SS_PASSWORD=wnxd
ENV SS_METHOD=aes-256-gcm
# vmess
ENV VMESS_PORT=9999
ENV VMESS_ID=00000000-0000-0000-0000-000000000000
ENV VMESS_LEVEL=1
ENV VMESS_ALTERID=64
# kcp
ENV KCP_PORT_VMESS=9999
ENV KCP_MUT=1350
ENV KCP_TTI=50
ENV KCP_UPLINK=5
ENV KCP_DOWNLINK=20
ENV KCP_READBUFF=2
ENV KCP_WRITEBUFF=2
EXPOSE ${SSH_PORT}/tcp
EXPOSE ${SS_PORT}/tcp
EXPOSE ${SS_PORT}/udp
EXPOSE ${VMESS_PORT}/tcp
EXPOSE ${KCP_PORT_VMESS}/udp
ENTRYPOINT [ "bash", "/usr/bin/entrypoint.sh" ]