Alexey Sokolov 7 years ago
parent fb2c648f77
commit 74b6d54502

@ -1,47 +1,49 @@
FROM alpine:3.5 FROM alpine:3.5
ENV ZNC_VERSION 1.6.4
ENV GPG_KEY D5823CACB477191CAC0075555AE420CC0209989E ENV GPG_KEY D5823CACB477191CAC0075555AE420CC0209989E
# modperl and modpython are built, but won't be loadable. # modperl and modpython are built, but won't be loadable.
# :extmodules image installs perl and python3 again, making these modules loadable. # :full image installs perl and python3 again, making these modules loadable.
# musl silently doesn't support AI_ADDRCONFIG yet, and ZNC doesn't support Happy Eyeballs yet. # musl silently doesn't support AI_ADDRCONFIG yet, and ZNC doesn't support Happy Eyeballs yet.
# Together they cause very slow connection. # Together they cause very slow connection. So for now IPv6 is disabled here.
ARG CONFIGUREFLAGS="--prefix=/opt/znc --enable-cyrus --enable-perl --enable-python --disable-ipv6" ARG CONFIGUREFLAGS="--prefix=/opt/znc --enable-cyrus --enable-perl --enable-python --disable-ipv6"
ARG MAKEFLAGS="" ARG MAKEFLAGS=""
ENV ZNC_VERSION 1.6.4
RUN set -x \ RUN set -x \
&& adduser -S znc \ && adduser -S znc \
&& addgroup -S znc \ && addgroup -S znc \
&& apk add --no-cache --virtual runtime-dependencies \ && apk add --no-cache --virtual runtime-dependencies \
tini \ ca-certificates \
cyrus-sasl \
icu \ icu \
openssl \ openssl \
cyrus-sasl \ tini \
ca-certificates \
&& apk add --no-cache --virtual build-dependencies \ && apk add --no-cache --virtual build-dependencies \
build-base \ build-base \
icu-dev \ curl \
openssl-dev \
cyrus-sasl-dev \ cyrus-sasl-dev \
gnupg \ gnupg \
icu-dev \
openssl-dev \
perl-dev \ perl-dev \
python3-dev \ python3-dev \
&& mkdir /znc-src && cd /znc-src \ && mkdir /znc-src && cd /znc-src \
&& wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" \ && curl -fsSL "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" -o znc.tgz \
&& wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz.sig" \ && curl -fsSL "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz.sig" -o znc.tgz.sig \
&& export GNUPGHOME="$(mktemp -d)" \ && export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "${GPG_KEY}" \ && gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "${GPG_KEY}" \
&& gpg --batch --verify znc-"${ZNC_VERSION}.tar.gz.sig" znc-"${ZNC_VERSION}.tar.gz" \ && gpg --batch --verify znc.tgz.sig znc.tgz \
&& rm -R "$GNUPGHOME" \ && rm -rf "$GNUPGHOME" \
&& tar -zxf znc-"${ZNC_VERSION}.tar.gz" \ && tar -zxf znc.tgz --strip-components=1 \
&& mkdir build && cd build \ && mkdir build && cd build \
&& ../znc-"${ZNC_VERSION}"/configure ${CONFIGUREFLAGS} \ && ../configure ${CONFIGUREFLAGS} \
&& make $MAKEFLAGS \ && make $MAKEFLAGS \
&& make install \ && make install \
&& apk del build-dependencies \ && apk del build-dependencies \
&& cd / && rm -Rf /znc-src && cd / && rm -rf /znc-src
COPY docker-entrypoint.sh / COPY docker-entrypoint.sh /

@ -9,7 +9,7 @@ fi
# Options. # Options.
DATADIR="/znc-data" DATADIR="/znc-data"
# Make sure $DATADIR is owned by znc user. This effects ownership of the # Make sure $DATADIR is owned by znc user. This affects ownership of the
# mounted directory on the host machine too. # mounted directory on the host machine too.
chown -R znc:znc "$DATADIR" || exit 1 chown -R znc:znc "$DATADIR" || exit 1
chmod 700 "$DATADIR" || exit 2 chmod 700 "$DATADIR" || exit 2

Loading…
Cancel
Save