From 49eadb84f996020d8479c2d4f76ff616ea98a1c9 Mon Sep 17 00:00:00 2001 From: Przemek Grondek Date: Sat, 5 Aug 2017 00:20:12 +0200 Subject: [PATCH] Backuppc docker file --- backuppc/Dockerfile | 27 +++++++++++++++++++++++++++ backuppc/supervisord.conf | 6 ++++++ 2 files changed, 33 insertions(+) create mode 100644 backuppc/Dockerfile create mode 100644 backuppc/supervisord.conf diff --git a/backuppc/Dockerfile b/backuppc/Dockerfile new file mode 100644 index 0000000..581f8e6 --- /dev/null +++ b/backuppc/Dockerfile @@ -0,0 +1,27 @@ +FROM ubuntu:16.04 +MAINTAINER Przemek Grondek + +ENV APACHE_RUN_USER www-data +ENV APACHE_RUN_GROUP www-data +ENV APACHE_LOG_DIR /var/log/apache2 +ENV APACHE_PID_FILE /var/run/apache2.pid +ENV APACHE_RUN_DIR /var/run/apache2 +ENV APACHE_LOCK_DIR /var/lock/apache2 +ENV APACHE_LOG_DIR /var/log/apache2 + +ENV DEBIAN_FRONTEND noninteractive +RUN apt-get update && \ + apt-get install -y backuppc gosu supervisor && \ + apt-get clean && \ + htpasswd -bB /etc/backuppc/htpasswd backuppc backuppc && \ + mkdir -p /var/run/backuppc && \ + chown backuppc:backuppc /var/run/backuppc && \ + sed -i "s/Alias \/backuppc/Alias \//g" /etc/backuppc/apache.conf + +COPY supervisord.conf / + +EXPOSE 80 +VOLUME ["/etc/backuppc", \ + "/var/lib/backuppc"] + +CMD ["supervisord", "-n", "-c", "/supervisord.conf"] \ No newline at end of file diff --git a/backuppc/supervisord.conf b/backuppc/supervisord.conf new file mode 100644 index 0000000..2eed450 --- /dev/null +++ b/backuppc/supervisord.conf @@ -0,0 +1,6 @@ +[supervisord] +[program:apache2] +command=/usr/sbin/apache2 -DFOREGROUND + +[program:backuppc] +command=gosu backuppc /usr/share/backuppc/bin/BackupPC