Last active
January 2, 2019 06:04
-
-
Save yasuoza/b98d69ec4e0db1ef4488077b4f2a14a3 to your computer and use it in GitHub Desktop.
Dockerfile for AdGuardHome
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://github.com/AdguardTeam/AdGuardHome/blob/fd629be/Dockerfile.linux64 | |
FROM alpine:latest | |
# AdGuard version | |
ARG ADGUARD_VERSION="0.92" | |
ENV ADGUARD_VERSION $ADGUARD_VERSION | |
# AdGuard architecture and package info | |
ARG ADGUARD_ARCH="linux_amd64" | |
ENV ADGUARD_ARCH ${ADGUARD_ARCH} | |
ENV ADGUARD_PACKAGE "AdGuardHome_v${ADGUARD_VERSION}_${ADGUARD_ARCH}" | |
# AdGuard release info | |
ARG ADGUARD_ARCHIVE="${ADGUARD_PACKAGE}.tar.gz" | |
ENV ADGUARD_ARCHIVE ${ADGUARD_ARCHIVE} | |
ARG ADGUARD_RELEASE="https://github.com/AdguardTeam/AdGuardHome/releases/download/v${ADGUARD_VERSION}/${ADGUARD_ARCHIVE}" | |
ENV ADGUARD_RELEASE ${ADGUARD_RELEASE} | |
# AdGuard directory | |
ARG ADGUARD_DIR="/data/adguard" | |
ENV ADGUARD_DIR ${ADGUARD_DIR} | |
# Update CA certs and download AdGuard binaries | |
RUN apk update && apk --no-cache --update add ca-certificates \ | |
&& cd /tmp \ | |
&& wget ${ADGUARD_RELEASE} \ | |
&& tar xvf ${ADGUARD_ARCHIVE} \ | |
&& mkdir -p "${ADGUARD_DIR}" \ | |
&& cp "AdGuardHome/AdGuardHome" "/" \ | |
&& chmod +x "/AdGuardHome" \ | |
&& rm -rf "AdGuardHome" \ | |
&& rm ${ADGUARD_ARCHIVE} | |
# Copy entry point | |
COPY docker-entrypoint.sh / | |
# Expose DNS port 53 | |
EXPOSE 53 53/udp | |
# Expose UI port 3000 | |
ARG ADGUARD_UI_HOST="0.0.0.0" | |
ENV ADGUARD_UI_HOST ${ADGUARD_UI_HOST} | |
ARG ADGUARD_UI_PORT="3000" | |
ENV ADGUARD_UI_PORT ${ADGUARD_UI_PORT} | |
EXPOSE ${ADGUARD_UI_PORT} | |
# Run AdGuardHome | |
WORKDIR ${ADGUARD_DIR} | |
VOLUME ${ADGUARD_DIR} | |
CMD "/AdGuardHome" --host ${ADGUARD_UI_HOST} --port ${ADGUARD_UI_PORT} --config "${ADGUARD_DIR}/AdGuardHome.yaml" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment