-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
60 lines (52 loc) · 1.72 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM alpine:3.11
ENV GPG_KEY D5823CACB477191CAC0075555AE420CC0209989E
# modperl and modpython are built, but won't be loadable.
# :full image installs perl and python3 again, making these modules loadable.
ARG CMAKEFLAGS="-DCMAKE_INSTALL_PREFIX=/opt/znc -DWANT_CYRUS=YES -DWANT_PERL=YES -DWANT_PYTHON=YES"
ARG MAKEFLAGS=""
ENV ZNC_VERSION 1.8.0
RUN set -x \
&& adduser -S znc \
&& addgroup -S znc \
&& apk add --no-cache --virtual runtime-dependencies \
boost \
ca-certificates \
cyrus-sasl \
icu \
libressl \
su-exec \
tini \
tzdata \
&& apk add --no-cache --virtual build-dependencies \
boost-dev \
build-base \
cmake \
curl \
cyrus-sasl-dev \
gettext \
gnupg \
icu-dev \
libressl-dev \
perl-dev \
python3-dev \
&& mkdir /znc-src && cd /znc-src \
&& curl -fsSL "https://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" -o znc.tgz \
&& curl -fsSL "https://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz.sig" -o znc.tgz.sig \
&& export GNUPGHOME="$(mktemp -d)" \
&& gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "${GPG_KEY}" \
&& gpg --batch --verify znc.tgz.sig znc.tgz \
&& rm -rf "$GNUPGHOME" \
&& tar -zxf znc.tgz --strip-components=1 \
&& mkdir build && cd build \
&& cmake .. ${CMAKEFLAGS} \
&& make $MAKEFLAGS \
&& make install \
&& apk del build-dependencies \
&& cd / && rm -rf /znc-src
COPY entrypoint.sh /
COPY 00-try-sh.sh /startup-sequence/
COPY 01-options.sh /startup-sequence/
COPY 20-chown.sh /startup-sequence/
COPY 99-launch.sh /startup-sequence/
VOLUME /znc-data
ENTRYPOINT ["/entrypoint.sh"]