Split minimal version from one which supports modules.

Inspired by https://github.com/jimeh/docker-znc
master
Alexey Sokolov 7 years ago
parent b5c7186415
commit 293ee74800

@ -0,0 +1,12 @@
FROM znc:stdonly
RUN set -x \
&& apk add --no-cache \
build-base \
icu-dev \
openssl-dev \
perl \
python3
COPY znc-entrypoint.sh /
ENTRYPOINT ["/znc-entrypoint.sh"]

@ -0,0 +1,22 @@
#!/bin/sh
# Options.
DATADIR="/znc-data"
# Build modules from source.
if [ -d "${DATADIR}/modules" ]; then
pushd "${DATADIR}/modules" > /dev/null || exit 1
# Find module sources.
modules=$(find "${DATADIR}/modules" -name "*.cpp")
if [ -n "$modules" ]; then
# Build modules.
echo "Building modules $modules..."
/opt/znc/bin/znc-buildmod $modules
fi
popd > /dev/null
fi
exec /opt/znc/bin/znc -f -d /znc-data $@

@ -2,6 +2,9 @@ FROM alpine:3.5
ENV ZNC_VERSION 1.6.4
# modperl and modpython are built, but won't be loadable.
# :extmodules image installs perl and python3 again, making these modules loadable.
ARG CONFIGUREFLAGS="--prefix=/opt/znc --enable-cyrus --enable-perl --enable-python"
ARG CLEANCMD="apk del build-dependencies && rm -Rf /znc-src"
ARG MAKEFLAGS=""
@ -12,9 +15,8 @@ RUN set -x \
&& apk add --no-cache --virtual runtime-dependencies \
icu \
openssl \
python3 \
perl \
cyrus-sasl \
ca-certificates \
&& apk add --no-cache --virtual build-dependencies \
build-base \
icu-dev \
Loading…
Cancel
Save