Alexey Sokolov 7 years ago
parent 7bf73d2591
commit 55cefeb693

@ -1,8 +1,5 @@
FROM znc:slim
# I don't know what it should do. It works for me without this line, but not for @tianon
USER root
# znc:slim removed them. Install them again.
RUN set -x \
&& apk add --no-cache \
@ -12,6 +9,3 @@ RUN set -x \
perl \
python3
COPY znc-build-modules.sh /
# Revert the USER root line above
USER znc

@ -20,6 +20,7 @@ RUN set -x \
cyrus-sasl \
icu \
openssl \
sudo \
tini \
&& apk add --no-cache --virtual build-dependencies \
build-base \
@ -47,7 +48,6 @@ RUN set -x \
COPY docker-entrypoint.sh /
USER znc
VOLUME /znc-data
ENTRYPOINT ["/docker-entrypoint.sh"]

@ -9,11 +9,6 @@ fi
# Options.
DATADIR="/znc-data"
# Make sure $DATADIR is owned by znc user. This affects ownership of the
# mounted directory on the host machine too.
chown -R znc:znc "$DATADIR" || exit 1
chmod 700 "$DATADIR" || exit 2
# This file is added by znc:full image
if [ -r /znc-build-modules.sh ]; then
source /znc-build-modules.sh || exit 3
@ -21,6 +16,12 @@ fi
cd /
# Make sure $DATADIR is owned by znc user. This affects ownership of the
# mounted directory on the host machine too.
chown -R znc:znc "$DATADIR" || exit 1
chmod 700 "$DATADIR" || exit 2
# ZNC itself responds to SIGTERM, and reaps its children, but whatever was
# started via *shell module is not guaranteed to reap their children.
exec /sbin/tini -- /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"
# That's why using tini.
exec /sbin/tini -- sudo --user znc /opt/znc/bin/znc --foreground --datadir "$DATADIR" "$@"

Loading…
Cancel
Save