2015-05-14 01:33:24 +02:00
|
|
|
# Run znc in a container
|
|
|
|
#
|
|
|
|
# docker run --restart always -d \
|
2015-06-05 19:24:11 +02:00
|
|
|
# --name znc \
|
|
|
|
# -p 6697:6697 \
|
|
|
|
# -v /volumes/znc:/home/user/.znc \
|
|
|
|
# jess/znc
|
2015-05-14 01:33:24 +02:00
|
|
|
#
|
2017-01-14 23:31:35 +01:00
|
|
|
FROM alpine:latest
|
2017-03-09 19:14:37 +01:00
|
|
|
LABEL maintainer "Jessie Frazelle <jess@linux.com>"
|
2014-09-12 18:30:09 +02:00
|
|
|
|
2017-01-14 23:31:35 +01:00
|
|
|
RUN apk add --no-cache \
|
2015-06-05 19:24:11 +02:00
|
|
|
ca-certificates \
|
2017-01-14 23:31:35 +01:00
|
|
|
glib \
|
2015-06-05 19:24:11 +02:00
|
|
|
perl \
|
2017-01-14 23:31:35 +01:00
|
|
|
perl-datetime \
|
|
|
|
perl-libwww
|
2014-09-12 18:30:09 +02:00
|
|
|
|
2015-01-29 05:54:39 +01:00
|
|
|
ENV HOME /home/user
|
2017-01-14 23:31:35 +01:00
|
|
|
RUN adduser -u 1001 -D user \
|
2015-06-05 19:24:11 +02:00
|
|
|
&& chown -R user:user $HOME
|
2015-01-29 05:54:39 +01:00
|
|
|
|
2015-01-29 07:24:04 +01:00
|
|
|
ENV LANG C.UTF-8
|
|
|
|
|
2018-02-23 20:09:52 +01:00
|
|
|
ENV ZNC_VERSION 1.6.5
|
2015-01-29 07:24:04 +01:00
|
|
|
|
2017-01-14 23:31:35 +01:00
|
|
|
RUN set -x \
|
|
|
|
&& apk add --no-cache --virtual .build-deps \
|
|
|
|
build-base \
|
|
|
|
curl \
|
|
|
|
libressl-dev \
|
|
|
|
perl-dev \
|
|
|
|
tar \
|
2015-06-05 19:24:11 +02:00
|
|
|
&& curl -sSL "http://znc.in/releases/znc-${ZNC_VERSION}.tar.gz" -o /tmp/znc.tar.gz \
|
|
|
|
&& mkdir -p /usr/src/znc \
|
|
|
|
&& tar -xzf /tmp/znc.tar.gz -C /usr/src/znc --strip-components 1 \
|
|
|
|
&& rm /tmp/znc.tar.gz* \
|
2017-01-14 23:31:35 +01:00
|
|
|
&& ( \
|
|
|
|
cd /usr/src/znc \
|
|
|
|
&& ./configure \
|
|
|
|
&& make -j8 \
|
|
|
|
&& make install \
|
|
|
|
) \
|
2015-06-05 19:24:11 +02:00
|
|
|
&& rm -rf /usr/src/znc \
|
2017-01-14 23:31:35 +01:00
|
|
|
&& runDeps="$( \
|
|
|
|
scanelf --needed --nobanner --recursive /usr \
|
|
|
|
| awk '{ gsub(/,/, "\nso:", $2); print "so:" $2 }' \
|
|
|
|
| sort -u \
|
|
|
|
| xargs -r apk info --installed \
|
|
|
|
| sort -u \
|
|
|
|
)" \
|
|
|
|
&& apk add --no-cache --virtual .irssi-rundeps $runDeps \
|
|
|
|
&& apk del .build-deps
|
2014-10-16 02:44:27 +02:00
|
|
|
|
2015-01-29 05:54:39 +01:00
|
|
|
WORKDIR $HOME
|
|
|
|
USER user
|
2014-10-16 02:44:27 +02:00
|
|
|
|
2015-01-29 05:54:39 +01:00
|
|
|
ENTRYPOINT [ "znc" ]
|
|
|
|
CMD [ "-f" ]
|