Update ZNC to v1.6.1

And also restructure the Dockerfile a bit.
This commit is contained in:
2015-09-20 17:37:41 +01:00
parent 3dfefba576
commit 48fb699f4b
5 changed files with 51 additions and 70 deletions

View File

@@ -1,19 +1,33 @@
# version 1.4-1
# docker-version 0.11.1
FROM ubuntu:12.04
# version 1.6.1-1
# docker-version 1.8.2
FROM ubuntu:15.04
MAINTAINER Jim Myhrberg "contact@jimeh.me"
# We use a bootstrap script to avoid having temporary cache files and build
# dependencies being committed and included into the docker image.
ADD bootstrap.sh /tmp/
RUN chmod +x /tmp/bootstrap.sh
RUN /tmp/bootstrap.sh
ENV ZNC_VERSION 1.6.1
RUN apt-get update \
&& apt-get install -y sudo wget build-essential libssl-dev libperl-dev \
pkg-config swig3.0 libicu-dev \
&& mkdir -p /src \
&& cd /src \
&& wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz" \
&& tar -zxf "znc-${ZNC_VERSION}.tar.gz" \
&& cd "znc-${ZNC_VERSION}" \
&& ./configure \
&& make \
&& make install \
&& apt-get remove -y wget \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /src* /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN useradd znc
ADD start-znc /usr/local/bin/
ADD znc.conf.default /src/
RUN chmod 644 /src/znc.conf.default
ADD docker-entrypoint.sh /entrypoint.sh
ADD znc.conf.default /znc.conf.default
RUN chmod 644 /znc.conf.default
VOLUME /znc-data
EXPOSE 6667
ENTRYPOINT ["/usr/local/bin/start-znc"]
ENTRYPOINT ["/entrypoint.sh"]
CMD [""]

View File

@@ -11,8 +11,9 @@ Run the [ZNC](http://znc.in) IRC Bouncer in a Docker container.
## Running
To retain your ZNC settings between runs, you will need to bind a directory
from the host to `/znc-data` in the container. For example:
To retain your ZNC settings between runs, you'll most likely want to
bind a directory from the host to `/znc-data` in the container. For
example:
docker run -d -p 6667 -v $HOME/.znc:/znc-data jimeh/znc

View File

@@ -1,34 +0,0 @@
#! /usr/bin/env bash
set -e
# Config
ZNC_VERSION="1.4"
# Ensure package list is up to date.
apt-get update
# Install runtime dependencies.
apt-get install -y sudo
# Install build dependencies.
apt-get install -y wget build-essential libssl-dev libperl-dev pkg-config
# Prepare building
mkdir -p /src
# Download, compile and install ZNC.
cd /src
wget "http://znc.in/releases/archive/znc-${ZNC_VERSION}.tar.gz"
tar -zxf "znc-${ZNC_VERSION}.tar.gz"
cd "znc-${ZNC_VERSION}"
./configure && make && make install
# Clean up
apt-get remove -y wget
apt-get autoremove -y
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

View File

@@ -24,7 +24,7 @@ fi
# Create default config if it doesn't exist
if [ ! -f "${DATADIR}/configs/znc.conf" ]; then
mkdir -p "${DATADIR}/configs"
cp /src/znc.conf.default "${DATADIR}/configs/znc.conf"
cp /znc.conf.default "${DATADIR}/configs/znc.conf"
fi
# Make sure $DATADIR is owned by znc user. This effects ownership of the

View File

@@ -8,7 +8,7 @@
// But if you feel risky, you might want to read help on /znc saveconfig and /znc rehash.
// Also check http://en.znc.in/wiki/Configuration
Version = 1.4
Version = 1.6.1
<Listener l>
Port = 6667
IPv4 = true
@@ -18,7 +18,7 @@ Version = 1.4
LoadModule = webadmin
<User admin>
Pass = sha256#1b9a69be60544ae4a83147ebb04c4c1edc24dba4c62f8f25ef5603b06c264476#5zD6V:PYLf*jZcL8VbZY#
Pass = sha256#00793765305dfc3e7bba28267fe9d9e2c721ebef4e20f3a89720265a89ee6a4f#N!lgZM8S.HZ4zH?)vFoW#
Admin = true
Nick = admin
AltNick = admin_