diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2018-06-20 16:29:06 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-20 16:29:06 +0200 |
commit | 9e425954817621711a528bb3bd2972692a2a528a (patch) | |
tree | e692e493688fea3f8d681c093ed574d90d75daa3 /Dockerfile | |
parent | c648fc34f882ca6a62f5a44d1826bbd2b9852845 (diff) | |
parent | 55346c1ebed66ce29dee0eee1fec5602b2d26078 (diff) | |
download | Shaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.gz Shaarli-9e425954817621711a528bb3bd2972692a2a528a.tar.zst Shaarli-9e425954817621711a528bb3bd2972692a2a528a.zip |
Merge pull request #1156 from virtualtam/v0.8-dockerfile
v0.8 - Build the Docker image from the local sources
Diffstat (limited to 'Dockerfile')
-rw-r--r-- | Dockerfile | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..e8067031 --- /dev/null +++ b/Dockerfile | |||
@@ -0,0 +1,50 @@ | |||
1 | # Stage 1: | ||
2 | # - Get Shaarli sources | ||
3 | # - Build documentation | ||
4 | FROM dalibo/pandocker:stable as docs | ||
5 | ADD . /pandoc/shaarli | ||
6 | RUN cd /pandoc/shaarli \ | ||
7 | && make htmldoc \ | ||
8 | && rm -rf .git | ||
9 | |||
10 | # Stage 2: | ||
11 | # - Resolve PHP dependencies with Composer | ||
12 | FROM composer:latest as composer | ||
13 | COPY --from=docs /pandoc/shaarli /app/shaarli | ||
14 | RUN cd shaarli \ | ||
15 | && composer --prefer-dist --no-dev install | ||
16 | |||
17 | # Stage 3: | ||
18 | # - Shaarli image | ||
19 | FROM debian:jessie | ||
20 | LABEL maintainer="Shaarli Community" | ||
21 | |||
22 | ENV TERM dumb | ||
23 | RUN apt-get update \ | ||
24 | && apt-get install --no-install-recommends -y \ | ||
25 | ca-certificates \ | ||
26 | curl \ | ||
27 | nginx-light \ | ||
28 | php5-curl \ | ||
29 | php5-fpm \ | ||
30 | php5-gd \ | ||
31 | php5-intl \ | ||
32 | supervisor \ | ||
33 | && apt-get clean | ||
34 | |||
35 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini \ | ||
36 | && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
37 | |||
38 | COPY .docker/nginx.conf /etc/nginx/nginx.conf | ||
39 | COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
40 | |||
41 | WORKDIR /var/www | ||
42 | COPY --from=composer /app/shaarli shaarli | ||
43 | RUN rm -rf html \ | ||
44 | && chown -R www-data:www-data . | ||
45 | |||
46 | VOLUME /var/www/shaarli/data | ||
47 | |||
48 | EXPOSE 80 | ||
49 | |||
50 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||