Improve Dockerfile

This commit is contained in:
Frederic Guillot 2016-02-18 21:51:08 -05:00
parent 1dce89b4f8
commit 54190c52e8
2 changed files with 12 additions and 5 deletions

View File

@ -1,11 +1,16 @@
FROM ubuntu:14.04
MAINTAINER Frederic Guillot <fred@miniflux.net>
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

View File

@ -27,3 +27,5 @@ Run container from the image:
```bash
docker run -p 80:80 --name miniflux <yourname/imagename>
```
You can also mount the volume `/var/www/html/data` to save the data on the host machine.