-
Notifications
You must be signed in to change notification settings - Fork 67
/
Dockerfile
77 lines (76 loc) · 2.64 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
FROM alpine:edge AS builder
RUN apk update && \
apk upgrade --no-cache
#actions COPY build_test_ok /
COPY --from=sliamb/prebuild-paopaodns /src/ /src/
COPY src/ /src/
RUN sh /src/build.sh
# build file check
RUN cp /src/Country-only-cn-private.mmdb.xz /tmp/ &&\
cp /src/global_mark.dat /tmp/ &&\
cp /src/data_update.sh /tmp/ &&\
cp /src/dnscrypt-resolvers/public-resolvers.md /tmp/ &&\
cp /src/dnscrypt-resolvers/public-resolvers.md.minisig /tmp/ &&\
cp /src/dnscrypt-resolvers/relays.md /tmp/ &&\
cp /src/dnscrypt-resolvers/relays.md.minisig /tmp/ &&\
cp /src/dnscrypt.toml /tmp/ &&\
cp /src/force_recurse_list.txt /tmp/ &&\
cp /src/force_dnscrypt_list.txt /tmp/ &&\
cp /src/init.sh /tmp/ &&\
cp /src/mosdns /tmp/ &&\
cp /src/mosdns.yaml /tmp/ &&\
cp /src/named.cache /tmp/ &&\
cp /src/redis.conf /tmp/ &&\
cp /src/repositories /tmp/ &&\
cp /src/unbound /tmp/ &&\
cp /src/unbound-checkconf /tmp/ &&\
cp /src/unbound.conf /tmp/ &&\
cp /src/unbound_custom.conf /tmp/ &&\
cp /src/custom_mod.yaml /tmp/ &&\
cp /src/custom_env.ini /tmp/ &&\
cp /src/trackerslist.txt.xz /tmp/ &&\
cp /src/watch_list.sh /tmp/ &&\
cp /src/redis-server /tmp/
# build binary check
RUN apk add --no-cache hiredis libevent libgcc && apk upgrade --no-cache
RUN if /src/mosdns version|grep kkkgo;then echo mosdns_check > /mosdns_check;else cp /mosdns_check /tmp/;fi
RUN if /src/unbound -V|grep libhiredis;then echo unbound_check > /unbound_check;else cp /unbound_check /tmp/;fi
RUN if /src/redis-server -v|grep build;then echo redis_check > /redis_check;else cp /redis_check /tmp/;fi
FROM alpine:edge
COPY --from=builder /src/ /usr/sbin/
RUN apk update && \
apk upgrade --no-cache && \
apk add --no-cache ca-certificates dcron tzdata hiredis libevent dnscrypt-proxy inotify-tools bind-tools libgcc xz && \
mkdir -p /etc/unbound && \
mv /usr/sbin/named.cache /etc/unbound/named.cache && \
adduser -D -H unbound && \
mv /usr/sbin/repositories /etc/apk/repositories && \
rm -rf /var/cache/apk/*
ARG DEVLOG_SW
ENV TZ=Asia/Shanghai \
DEVLOG=$DEVLOG_SW \
UPDATE=weekly \
DNS_SERVERNAME=PaoPaoDNS,blog.03k.org \
DNSPORT=53 \
CNAUTO=yes \
CNFALL=yes \
CN_TRACKER=yes \
USE_HOSTS=no \
IPV6=no \
SOCKS5=IP:PORT \
SERVER_IP=none \
CUSTOM_FORWARD=IP:PORT \
CUSTOM_FORWARD_TTL=0 \
AUTO_FORWARD=no \
AUTO_FORWARD_CHECK=yes \
USE_MARK_DATA=yes \
RULES_TTL=0 \
HTTP_FILE=no \
QUERY_TIME=2000ms \
ADDINFO=no \
SHUFFLE=no \
EXPIRED_FLUSH=yes
VOLUME /data
WORKDIR /data
EXPOSE 53/udp 53/tcp 5304/udp 5304/tcp 7889/tcp
CMD /usr/sbin/init.sh