@@ -20,7 +20,8 @@ ARG PIHOLE_GID=1000
2020ENV DNSMASQ_USER=pihole
2121ENV FTL_CMD=no-daemon
2222
23- RUN apk add --no-cache \
23+ RUN --mount=type=cache,target=/var/cache/apk \
24+ apk add \
2425 bash \
2526 bash-completion \
2627 bind-tools \
@@ -43,21 +44,10 @@ RUN apk add --no-cache \
4344 unzip \
4445 wget
4546
46- # For nightly images, we install gdb and screen for ease of debugging (this is
47- # not included in the default image to keep it small), and also prepare the
48- # system for a core dump. Furthermore, we already add the required signal
49- # instructions to the gdb config file
50- RUN if [ "${PIHOLE_DOCKER_TAG}" = "nightly" ]; then \
51- apk add --no-cache gdb screen && \
52- echo "ulimit -c unlimited" >> /etc/profile && \
53- echo "handle SIGHUP nostop SIGPIPE nostop SIGTERM nostop SIG32 nostop SIG33 nostop SIG34 nostop SIG35 nostop SIG36 nostop SIG37 nostop SIG38 nostop SIG39 nostop SIG40 nostop SIG41 nostop" > /root/.gdbinit; \
54- fi
55-
56- ADD https://ftl.pi-hole.net/macvendor.db /macvendor.db
57- COPY crontab.txt /crontab.txt
47+ ADD --link https://ftl.pi-hole.net/macvendor.db /macvendor.db
5848
5949# Add PADD to the container, too.
60- ADD --chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
50+ ADD --link -- chmod=0755 https://raw.githubusercontent.com/${PADD_FORK}/PADD/${PADD_BRANCH}/padd.sh /usr/local/bin/padd
6151
6252# download a the main repos from github
6353# if the branch is master we clone the latest tag as sometimes the master branch contains meta changes that have not been tagged
@@ -94,12 +84,23 @@ RUN cd /etc/.pihole && \
9484 install -Dm644 ./advanced/bash-completion/pihole-ftl.bash /etc/bash_completion.d/pihole-FTL && \
9585 install -T -m 0755 ./advanced/Templates/pihole-FTL-prestart.sh /opt/pihole/pihole-FTL-prestart.sh && \
9686 install -T -m 0755 ./advanced/Templates/pihole-FTL-poststop.sh /opt/pihole/pihole-FTL-poststop.sh && \
97- addgroup -S pihole -g ${PIHOLE_GID} && adduser -S pihole -G pihole -u ${PIHOLE_UID} && \
98- echo "${PIHOLE_DOCKER_TAG}" > /pihole.docker.tag
87+ addgroup -S pihole -g ${PIHOLE_GID} && adduser -S pihole -G pihole -u ${PIHOLE_UID}
9988
10089COPY --chmod=0755 bash_functions.sh /usr/bin/bash_functions.sh
10190COPY --chmod=0755 prefix-time.sh /usr/bin/prefix-time.sh
10291COPY --chmod=0755 start.sh /usr/bin/start.sh
92+ COPY crontab.txt /crontab.txt
93+
94+ # For nightly images, we install gdb and screen for ease of debugging (this is
95+ # not included in the default image to keep it small), and also prepare the
96+ # system for a core dump. Furthermore, we already add the required signal
97+ # instructions to the gdb config file
98+ RUN if [ "${PIHOLE_DOCKER_TAG}" = "nightly" ]; then \
99+ apk add --no-cache gdb screen && \
100+ echo "ulimit -c unlimited" >> /etc/profile && \
101+ echo "handle SIGHUP nostop SIGPIPE nostop SIGTERM nostop SIG32 nostop SIG33 nostop SIG34 nostop SIG35 nostop SIG36 nostop SIG37 nostop SIG38 nostop SIG39 nostop SIG40 nostop SIG41 nostop" > /root/.gdbinit; \
102+ fi; \
103+ echo "${PIHOLE_DOCKER_TAG}" > /pihole.docker.tag
103104
104105EXPOSE 53 53/udp
105106EXPOSE 67/udp
0 commit comments