From 1ac4bf48eac3b858cfc5a54b5b71a5fc8d5f1944 Mon Sep 17 00:00:00 2001 From: c0ding Date: Mon, 27 Oct 2014 12:58:42 +0100 Subject: [PATCH] added Dockerfile --- docker/Dockerfile | 41 +++++++++++++++++++++++++++++++++++++++++ docker/README.md | 17 +++++++++++++++++ docker/lighttpd.conf | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 92 insertions(+) create mode 100644 docker/Dockerfile create mode 100644 docker/README.md create mode 100644 docker/lighttpd.conf diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..e41e777 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,41 @@ +FROM debian:jessie + +ENV DEBIAN_FRONTEND noninteractive + +RUN \ + apt-get update && \ + apt-get -y upgrade && \ + apt-get -y install \ + lighttpd \ + php5-common \ + php5-cgi \ + php5-sqlite \ + php-xml-parser \ + php5 \ + unzip \ + wget + +RUN \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +RUN \ + cd /root && \ + wget https://github.com/fguillot/miniflux/archive/master.zip -O miniflux.zip && \ + unzip miniflux.zip -d /var/www && \ + mv /var/www/miniflux-master/* /var/www/ && \ + rm miniflux.zip && \ + rm -r /var/www/html && \ + rm -r /var/www/miniflux-master && \ + chmod +x /var/www/data + +RUN \ + chown -R www-data:www-data /var/www && \ + rm /etc/lighttpd/lighttpd.conf + +ADD \ + lighttpd.conf /etc/lighttpd/lighttpd.conf + +EXPOSE 80 + +CMD ["/usr/sbin/lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] \ No newline at end of file diff --git a/docker/README.md b/docker/README.md new file mode 100644 index 0000000..19cdf66 --- /dev/null +++ b/docker/README.md @@ -0,0 +1,17 @@ +Installation +========== + + +## Build image : + +``` +docker build -t . +``` + +## Run container from image : + +``` +docker run -p 80:80 --name miniflux +``` + +Enjoy! \ No newline at end of file diff --git a/docker/lighttpd.conf b/docker/lighttpd.conf new file mode 100644 index 0000000..ce7be5e --- /dev/null +++ b/docker/lighttpd.conf @@ -0,0 +1,34 @@ +server.modules = ( + "mod_access", + "mod_fastcgi", + "mod_alias", + "mod_compress", + "mod_redirect", +# "mod_rewrite", +) + +server.document-root = "/var/www/" +server.upload-dirs = ( "/var/cache/lighttpd/uploads" ) +server.errorlog = "/var/log/lighttpd/error.log" +server.pid-file = "/var/run/lighttpd.pid" +server.username = "www-data" +server.groupname = "www-data" +server.port = 80 + + +index-file.names = ( "index.php", "index.html", "index.lighttpd.html" ) +url.access-deny = ( "~", ".inc" ) +static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" ) + +compress.cache-dir = "/var/cache/lighttpd/compress/" +compress.filetype = ( "application/javascript", "text/css", "text/html", "text/plain" ) + +# default listening port for IPv6 falls back to the IPv4 port +include_shell "/usr/share/lighttpd/use-ipv6.pl " + server.port +include_shell "/usr/share/lighttpd/create-mime.assign.pl" +include_shell "/usr/share/lighttpd/include-conf-enabled.pl" + +fastcgi.server = ( ".php" => (( + "bin-path" => "/usr/bin/php-cgi", + "socket" => "/tmp/php.socket" + ))) \ No newline at end of file