docker-pi-hole/Dockerfile.template

46 lines
1.3 KiB
Docker
Raw Normal View History

FROM {{ pihole.base }}
LABEL image="{{ pihole.name }}:{{ pihole.os }}_{{ pihole.arch }}"
LABEL maintainer="{{ pihole.maintainer }}"
LABEL url="https://www.github.com/diginc/docker-pi-hole"
ARG DEBIAN_FRONTED=noninteractive
ENV TAG {{ pihole.os }}
ENV ARCH {{ pihole.arch }}
ENV PATH /opt/pihole:${PATH}
COPY install.sh /usr/local/bin/docker-install.sh
ENV setupVars /etc/pihole/setupVars.conf
ENV PIHOLE_INSTALL /tmp/ph_install.sh
ENV S6OVERLAY_RELEASE https://github.com/just-containers/s6-overlay/releases/download/{{ pihole.s6_version }}/s6-overlay-{{ pihole.arch }}.tar.gz
RUN apt-get update && \
apt-get install -y wget curl net-tools cron procps && \
curl -L -s $S6OVERLAY_RELEASE \
| tar xvzf - -C / && \
docker-install.sh && \
rm -rf /var/cache/apt/archives /var/lib/apt/lists/*
ENTRYPOINT [ "/init" ]
ADD s6/{{ pihole.os }}-root /
COPY s6/service /usr/local/bin/service
# php config start passes special ENVs into
ENV PHP_ENV_CONFIG '{{ pihole.php_env_config }}'
ENV PHP_ERROR_LOG '{{ pihole.php_error_log }}'
COPY ./start.sh /
COPY ./bash_functions.sh /
# IPv6 disable flag for networks/devices that do not support it
ENV IPv6 True
EXPOSE 53 53/udp
EXPOSE 80
ENV S6_LOGGING 0
ENV S6_KEEP_ENV 1
ENV S6_BEHAVIOUR_IF_STAGE2_FAILS 2
SHELL ["/bin/bash", "-c"]