aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile42
1 files changed, 42 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 00000000..5e03814c
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,42 @@
1# Stage 1:
2# - Get Shaarli sources
3# - Resolve PHP dependencies with Composer
4FROM composer:latest as composer
5ADD . /app/shaarli
6RUN cd shaarli \
7 && composer --prefer-dist --no-dev install
8
9# Stage 2:
10# - Shaarli image
11FROM debian:jessie
12LABEL maintainer="Shaarli Community"
13
14ENV TERM dumb
15RUN apt-get update \
16 && apt-get install --no-install-recommends -y \
17 ca-certificates \
18 curl \
19 nginx-light \
20 php5-curl \
21 php5-fpm \
22 php5-gd \
23 php5-intl \
24 supervisor \
25 && apt-get clean
26
27RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini \
28 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini
29
30COPY .docker/nginx.conf /etc/nginx/nginx.conf
31COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf
32
33WORKDIR /var/www
34COPY --from=composer /app/shaarli shaarli
35RUN rm -rf html \
36 && chown -R www-data:www-data .
37
38VOLUME /var/www/shaarli/data
39
40EXPOSE 80
41
42CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]