Skip to content

Commit

Permalink
Pull request 1794: 3290-kill-zombies
Browse files Browse the repository at this point in the history
Merge in DNS/adguard-home from 3290-kill-zombies to master

Updates #3290.

Squashed commit of the following:

commit 3e06260
Merge: 5aa7aa4 1731ce9
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Mar 31 20:04:04 2023 +0500

    Merge branch 'master' into 3290-kill-zombies

commit 5aa7aa4
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Mar 31 16:38:00 2023 +0500

    docker: add doc

commit 52a0b67
Author: Eugene Burkov <E.Burkov@AdGuard.COM>
Date:   Fri Mar 31 14:41:41 2023 +0500

    docker: add init emulator
  • Loading branch information
EugeneOne1 committed Mar 31, 2023
1 parent 1731ce9 commit f191cb0
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ RUN apk --no-cache add ca-certificates libcap tzdata && \
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
chown -R nobody: /opt/adguardhome

RUN apk --no-cache add tini

ARG DIST_DIR
ARG TARGETARCH
ARG TARGETOS
Expand Down Expand Up @@ -62,11 +64,22 @@ COPY --chown=nobody:nogroup\
./${DIST_DIR}/docker/scripts\
/opt/adguardhome/scripts

ENTRYPOINT ["/opt/adguardhome/AdGuardHome"]
HEALTHCHECK \
--interval=30s \
--timeout=10s \
--retries=3 \
CMD [ "/opt/adguardhome/scripts/healthcheck.sh" ]

HEALTHCHECK --interval=30s --timeout=10s --retries=3 CMD [ "/opt/adguardhome/scripts/healthcheck.sh" ]
# It seems that the healthckech script sometimes spawns zombie processes, so we
# need a way to handle them, since AdGuard Home doesn't know how to keep track
# of the processes delegated to it by the OS. Use tini as entry point because
# it needs the PID=1 to be the default parent for orphaned processes.
#
# See https://github.com/adguardTeam/adGuardHome/issues/3290.
ENTRYPOINT [ "/sbin/tini", "--" ]

CMD [ \
"/opt/adguardhome/AdGuardHome", \
"--no-check-update", \
"-c", "/opt/adguardhome/conf/AdGuardHome.yaml", \
"-h", "0.0.0.0", \
Expand Down

0 comments on commit f191cb0

Please sign in to comment.