initial commit

This commit is contained in:
dave 2015-01-06 18:56:01 -08:00
commit 849efc8785
3 changed files with 42 additions and 0 deletions

20
Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM ubuntu:14.04
MAINTAINER Dave P
# Admin user
RUN useradd --create-home --groups sudo admin ; echo "admin:admin" | chpasswd ; locale-gen en
# ZNC user
RUN useradd --create-home znc ; echo "znc:znc" | chpasswd
# Install bind and vim
RUN mkdir /var/run/sshd ; apt-get update ; apt-get install -y supervisor vim openssh-server znc znc-python znc-dev dpkg-dev
# Get ZNC source
RUN su -c 'cd /home/znc ; apt-get source znc' znc
COPY daemons.conf /etc/supervisor/conf.d/daemons.conf
COPY start /start
#EXPOSE 53/udp
EXPOSE 22
RUN chmod +x /start

11
daemons.conf Normal file
View File

@ -0,0 +1,11 @@
[supervisord]
nodaemon=true
[program:sshd]
command=/usr/sbin/sshd -D
autorestart=true
[program:znc]
command=su -c "/usr/bin/znc --foreground --debug" znc
autorestart=true

11
start Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
if [ ! -f /home/admin/znc_configured ]; then
touch /home/admin/znc_configured
echo "Configure ZNC to your liking now. Remember to choose NO when asked to launch znc!!"
su -c "/usr/bin/znc --makeconf" znc
exit
fi
supervisord