-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathDockerfile
35 lines (24 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
FROM alpine:3.15
RUN apk add --no-cache \
libcap \
unbound=1.13.2-r2
WORKDIR /tmp
RUN wget https://www.internic.net/domain/named.root -qO- >> /etc/unbound/root.hints
COPY files/ /opt/
# AdGuardHome
RUN wget https://static.adguard.com/adguardhome/release/AdGuardHome_linux_amd64.tar.gz >/dev/null 2>&1 \
&& mkdir -p /opt/adguardhome/conf /opt/adguardhome/work \
&& tar xf AdGuardHome_linux_amd64.tar.gz ./AdGuardHome/AdGuardHome --strip-components=2 -C /opt/adguardhome \
&& /bin/ash /opt/adguardhome \
&& chown -R nobody: /opt/adguardhome \
&& setcap 'CAP_NET_BIND_SERVICE=+eip CAP_NET_RAW=+eip' /opt/adguardhome/AdGuardHome \
&& chmod +x /opt/entrypoint.sh \
&& rm -rf /tmp/* /var/cache/apk/*
WORKDIR /opt/adguardhome/work
VOLUME ["/opt/adguardhome/conf", "/opt/adguardhome/work", "/opt/unbound"]
EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 853/tcp 3000/tcp 5053/udp 5053/tcp
HEALTHCHECK --interval=30s --timeout=15s --start-period=5s\
CMD sh /opt/healthcheck.sh
CMD ["/opt/entrypoint.sh"]
LABEL \
maintainer="lolgast1987 <lolgast@live.nl>"