From 54190c52e828d68b8e37b373add140de1a78437e Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Thu, 18 Feb 2016 21:51:08 -0500 Subject: [PATCH] Improve Dockerfile --- Dockerfile | 15 ++++++++++----- docs/docker.markdown | 2 ++ 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index a2d152c..618c27b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,11 +1,16 @@ FROM ubuntu:14.04 MAINTAINER Frederic Guillot -RUN apt-get update && apt-get install -y apache2 php5 php5-sqlite git && apt-get clean && rm -rf /var/lib/apt/lists/* -RUN echo "ServerName localhost" >> /etc/apache2/apache2.conf -COPY . /var/www/miniflux -RUN rm -rf /var/www/html && mv /var/www/miniflux /var/www/html -RUN chown -R www-data:www-data /var/www/html/data +RUN apt-get update && \ + apt-get install -y apache2 php5 php5-sqlite php5-curl && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ + echo "ServerName localhost" >> /etc/apache2/apache2.conf + +COPY . /var/www/html + +RUN rm -rf /var/www/html/index.html /var/www/html/data/* && \ + mkdir /var/www/html/data/favicons && \ + chown -R www-data:www-data /var/www/html/data VOLUME /var/www/html/data diff --git a/docs/docker.markdown b/docs/docker.markdown index 9cb4434..71086ff 100644 --- a/docs/docker.markdown +++ b/docs/docker.markdown @@ -27,3 +27,5 @@ Run container from the image: ```bash docker run -p 80:80 --name miniflux ``` + +You can also mount the volume `/var/www/html/data` to save the data on the host machine.