forked from 869783641/Docker-UnblockNeteaseMusic-ss
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (46 loc) · 1.72 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
FROM alpine:latest AS builder
# Define V2Ray version
ARG V2RAY_VERSION=v4.23.1
# Define UnblockNeteaseMusic version
ARG UNBLOCKNETEASEMUSIC_VERSION=master
# Install build dependencies
RUN apk update && \
apk add git wget unzip gcc autoconf make libtool automake zlib-dev openssl asciidoc xmlto libpcre32 libev-dev g++ linux-headers
# Build simple-obfs
RUN git clone https://github.com/shadowsocks/simple-obfs.git /simple-obfs && \
cd /simple-obfs && \
git submodule update --init --recursive && \
./autogen.sh && \
./configure --disable-documentation && \
make install
# Download mo
RUN cd /root && \
wget -q -O mo https://git.io/get-mo && \
chmod +x mo
# Download V2Ray
RUN cd /root && \
wget -q -O v2ray.zip https://github.com/v2ray/v2ray-core/releases/download/${V2RAY_VERSION}/v2ray-linux-64.zip && \
unzip v2ray.zip
# Download UnblockNeteaseMusic
RUN git clone https://github.com/nondanee/UnblockNeteaseMusic.git /UnblockNeteaseMusic && \
cd /UnblockNeteaseMusic && \
git checkout ${UNBLOCKNETEASEMUSIC_VERSION}
FROM alpine:latest
LABEL maintainer="hly0928 <[email protected]>"
COPY --from=builder /usr/local/bin/obfs-server /usr/local/bin/
COPY --from=builder /root/mo /usr/local/bin/
COPY --from=builder /root/v2ray /root/v2ctl /root/geoip.dat /root/geosite.dat /usr/local/bin/
COPY --from=builder /UnblockNeteaseMusic .
COPY entrypoint.sh /usr/local/bin/
COPY certs/server.crt certs/server.key /certs/
COPY template.json /etc/v2ray/template.json
ENV PORT=8080 \
PASSWORD=UnblockNeteaseMusic \
METHOD=aes-256-gcm \
OBFS=http \
STRICT=false \
SOURCE="qq kugou kuwo xiami"
RUN apk add --no-cache bash libev nodejs && \
rm -f server.crt server.key
EXPOSE 8080
ENTRYPOINT ["entrypoint.sh"]