From 4ad29ee65dd95593fec96dd3d969c4d23aa36faa Mon Sep 17 00:00:00 2001 From: Erik Rogers Date: Thu, 18 Oct 2018 04:16:50 -0400 Subject: [PATCH] Add Dockerfiles --- Dockerfile.arm | 48 ++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile.linux | 48 ++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile.linux64 | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 144 insertions(+) create mode 100644 Dockerfile.arm create mode 100644 Dockerfile.linux create mode 100644 Dockerfile.linux64 diff --git a/Dockerfile.arm b/Dockerfile.arm new file mode 100644 index 00000000..9793bf79 --- /dev/null +++ b/Dockerfile.arm @@ -0,0 +1,48 @@ +FROM easypi/alpine-arm:latest +LABEL maintainer="Erik Rogers " + +# AdGuard version +ARG ADGUARD_VERSION="0.9" +ENV ADGUARD_VERSION $ADGUARD_VERSION + +# AdGuard architecture and package info +ARG ADGUARD_ARCH="linux_arm" +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 --no-cache --update add ca-certificates \ + && cd /tmp \ + && wget ${ADGUARD_RELEASE} \ + && tar xvf ${ADGUARD_ARCHIVE} \ + && mkdir -p "${ADGUARD_DIR}" \ + && cp "AdGuardHome/AdGuardHome" "${ADGUARD_DIR}" \ + && chmod +x "${ADGUARD_DIR}/AdGuardHome" \ + && rm -rf "AdGuardHome" \ + && rm ${ADGUARD_ARCHIVE} + +# Expose DNS port 53 +EXPOSE 53 + +# 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} +ENTRYPOINT ./AdGuardHome --host ${ADGUARD_UI_HOST} --port ${ADGUARD_UI_PORT} diff --git a/Dockerfile.linux b/Dockerfile.linux new file mode 100644 index 00000000..c93805de --- /dev/null +++ b/Dockerfile.linux @@ -0,0 +1,48 @@ +FROM alpine:latest +LABEL maintainer="Erik Rogers " + +# AdGuard version +ARG ADGUARD_VERSION="0.9" +ENV ADGUARD_VERSION $ADGUARD_VERSION + +# AdGuard architecture and package info +ARG ADGUARD_ARCH="linux_386" +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 --no-cache --update add ca-certificates \ + && cd /tmp \ + && wget ${ADGUARD_RELEASE} \ + && tar xvf ${ADGUARD_ARCHIVE} \ + && mkdir -p "${ADGUARD_DIR}" \ + && cp "AdGuardHome/AdGuardHome" "${ADGUARD_DIR}" \ + && chmod +x "${ADGUARD_DIR}/AdGuardHome" \ + && rm -rf "AdGuardHome" \ + && rm ${ADGUARD_ARCHIVE} + +# Expose DNS port 53 +EXPOSE 53 + +# 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} +ENTRYPOINT ./AdGuardHome --host ${ADGUARD_UI_HOST} --port ${ADGUARD_UI_PORT} diff --git a/Dockerfile.linux64 b/Dockerfile.linux64 new file mode 100644 index 00000000..24499548 --- /dev/null +++ b/Dockerfile.linux64 @@ -0,0 +1,48 @@ +FROM alpine:latest +LABEL maintainer="Erik Rogers " + +# AdGuard version +ARG ADGUARD_VERSION="0.9" +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 --no-cache --update add ca-certificates \ + && cd /tmp \ + && wget ${ADGUARD_RELEASE} \ + && tar xvf ${ADGUARD_ARCHIVE} \ + && mkdir -p "${ADGUARD_DIR}" \ + && cp "AdGuardHome/AdGuardHome" "${ADGUARD_DIR}" \ + && chmod +x "${ADGUARD_DIR}/AdGuardHome" \ + && rm -rf "AdGuardHome" \ + && rm ${ADGUARD_ARCHIVE} + +# Expose DNS port 53 +EXPOSE 53 + +# 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} +ENTRYPOINT ./AdGuardHome --host ${ADGUARD_UI_HOST} --port ${ADGUARD_UI_PORT}