forked from linuxserver/docker-znc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
91 lines (82 loc) · 1.68 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM lsiobase/alpine:3.6
MAINTAINER sparklyballs
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
# package version
ARG ZNC_VER="latest"
# install build packages
RUN \
apk add --no-cache --virtual=build-dependencies \
autoconf \
automake \
c-ares-dev \
curl \
cyrus-sasl-dev \
g++ \
gcc \
gettext-dev \
git \
icu-dev \
make \
openssl-dev \
perl-dev \
python3-dev \
swig \
tar \
tcl-dev && \
# fetch and unpack source
mkdir -p \
/tmp/znc && \
curl -o \
/tmp/znc-src.tar.gz -L \
"http://znc.in/nightly/znc-${ZNC_VER}.tar.gz" && \
tar xf \
/tmp/znc-src.tar.gz -C \
/tmp/znc --strip-components=1 && \
curl -o \
/tmp/playback.tar.gz -L \
https://github.com/jpnurmi/znc-playback/archive/master.tar.gz && \
tar xf \
/tmp/playback.tar.gz -C \
/tmp/znc/modules --strip-components=1 && \
# configure and compile znc
cd /tmp/znc && \
export CFLAGS="$CFLAGS -D_GNU_SOURCE" && \
./configure \
--build=$CBUILD \
--enable-cyrus \
--enable-perl \
--enable-python \
--enable-swig \
--enable-tcl \
--host=$CHOST \
--infodir=/usr/share/info \
--localstatedir=/var \
--mandir=/usr/share/man \
--prefix=/usr \
--sysconfdir=/etc && \
make && \
make install && \
# determine build packages to keep
RUNTIME_PACKAGES="$( \
scanelf --needed --nobanner /usr/bin/znc \
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
| sort -u \
| xargs -r apk info --installed \
| sort -u \
)" && \
apk add --no-cache \
${RUNTIME_PACKAGES} \
ca-certificates && \
# cleanup
apk del --purge \
build-dependencies && \
rm -rf \
/tmp/*
# add local files
COPY /root /
# ports and volumes
EXPOSE 6501
VOLUME /config