From 00fbafc18f746f69ee146ba9a55844a1449d728d Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 26 Jan 2014 12:50:05 +0000 Subject: [PATCH] Fix issue #3 and generally update project --- Dockerfile | 15 +++++++-------- Makefile | 7 +++++++ bootstrap.sh | 14 ++++++++++++++ 3 files changed, 28 insertions(+), 8 deletions(-) create mode 100644 Makefile create mode 100644 bootstrap.sh diff --git a/Dockerfile b/Dockerfile index 207a6b8..0c4ffbe 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,18 +1,17 @@ -# version 0.0.1 -# docker-version 0.6.6 +# version 0.0.2 +# docker-version 0.7.6 FROM ubuntu:12.04 MAINTAINER Jim Myhrberg "contact@jimeh.me" -# Make sure the package repository is up to date. -RUN echo "deb http://archive.ubuntu.com/ubuntu precise-backports universe" >> /etc/apt/sources.list -RUN apt-get update - -# Let's do this... -RUN apt-get install -y znc/precise-backports znc-dbg/precise-backports znc-dev/precise-backports znc-extra/precise-backports znc-perl/precise-backports znc-python/precise-backports znc-tcl/precise-backports && apt-get clean +# 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 && /tmp/bootstrap.sh RUN useradd znc ADD start-znc /usr/local/bin/ ADD znc.conf.default /src/ +RUN chmod 644 /src/znc.conf.default USER znc EXPOSE 6667 diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..3aec5b4 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +build: + docker build -t ${USER}/znc . + +push: build + docker push ${USER}/znc + +.PHONY: default diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100644 index 0000000..4700988 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,14 @@ +#! /usr/bin/env bash + +# Install +apt-get install -y python-software-properties +add-apt-repository ppa:teward/znc +apt-get update +apt-get install -y znc znc-dbg znc-dev znc-perl znc-python znc-tcl +apt-get install -y znc znc-dbg znc-dev znc-extra znc-perl znc-python znc-tcl + + +# Clean up +apt-get remove -y python-software-properties +apt-get autoremove -y +apt-get clean