-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathDockerfile.rpi
32 lines (21 loc) · 1.03 KB
/
Dockerfile.rpi
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
FROM balenalib/rpi-debian:jessie-build AS build
WORKDIR /usr/src
RUN install_packages cmake libraspberrypi-dev
RUN curl -sSL https://raw.githubusercontent.com/tasanakorn/rpi-fbcp/master/CMakeLists.txt -O
RUN curl -sSL https://raw.githubusercontent.com/tasanakorn/rpi-fbcp/master/main.c -O
WORKDIR /usr/src/build
RUN cmake .. && make
FROM pihole/pihole:v4.4-armel
WORKDIR /usr/src
COPY --from=build /opt/vc/lib/* /opt/vc/lib/
COPY --from=build /usr/src/build/fbcp /usr/src/
COPY services/ /etc/services.d/
COPY init/ /etc/cont-init.d/
RUN sed -i '/$AUTHORIZED_HOSTNAMES = array(/ a "balena-devices.com",' /var/www/html/admin/scripts/pi-hole/php/auth.php
# https://serverfault.com/a/817791
# force dnsmasq to bind only the interfaces it is listening on
# otherwise dnsmasq will fail to start since balena is using 53 on some interfaces
RUN echo "bind-interfaces" >> /etc/dnsmasq.conf
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
RUN curl -fsSL https://github.com/jpmck/PADD/archive/v3.1.tar.gz | tar xz --strip-components 1 \
&& chmod +x padd.sh