diff options
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 42 |
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 | ||
4 | FROM composer:latest as composer | ||
5 | ADD . /app/shaarli | ||
6 | RUN cd shaarli \ | ||
7 | && composer --prefer-dist --no-dev install | ||
8 | |||
9 | # Stage 2: | ||
10 | # - Shaarli image | ||
11 | FROM debian:jessie | ||
12 | LABEL maintainer="Shaarli Community" | ||
13 | |||
14 | ENV TERM dumb | ||
15 | RUN 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 | |||
27 | RUN 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 | |||
30 | COPY .docker/nginx.conf /etc/nginx/nginx.conf | ||
31 | COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
32 | |||
33 | WORKDIR /var/www | ||
34 | COPY --from=composer /app/shaarli shaarli | ||
35 | RUN rm -rf html \ | ||
36 | && chown -R www-data:www-data . | ||
37 | |||
38 | VOLUME /var/www/shaarli/data | ||
39 | |||
40 | EXPOSE 80 | ||
41 | |||
42 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||