]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - Dockerfile
Bump Shaarli version to v0.8.7
[github/shaarli/Shaarli.git] / Dockerfile
CommitLineData
35927142
V
1# Stage 1:
2# - Get Shaarli sources
754ee049
V
3# - Build documentation
4FROM dalibo/pandocker:stable as docs
5ADD . /pandoc/shaarli
6RUN cd /pandoc/shaarli \
7 && make htmldoc \
8 && rm -rf .git
9
10# Stage 2:
35927142
V
11# - Resolve PHP dependencies with Composer
12FROM composer:latest as composer
754ee049 13COPY --from=docs /pandoc/shaarli /app/shaarli
35927142
V
14RUN cd shaarli \
15 && composer --prefer-dist --no-dev install
16
754ee049 17# Stage 3:
35927142
V
18# - Shaarli image
19FROM debian:jessie
20LABEL maintainer="Shaarli Community"
21
22ENV TERM dumb
23RUN 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
35RUN 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
38COPY .docker/nginx.conf /etc/nginx/nginx.conf
39COPY .docker/supervised.conf /etc/supervisor/conf.d/supervised.conf
40
41WORKDIR /var/www
42COPY --from=composer /app/shaarli shaarli
43RUN rm -rf html \
44 && chown -R www-data:www-data .
45
46VOLUME /var/www/shaarli/data
47
48EXPOSE 80
49
50CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"]