diff options
author | VirtualTam <virtualtam@flibidi.net> | 2017-04-09 14:50:13 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2017-10-03 19:47:01 +0200 |
commit | 1a216faecb5c114afbf36ecbac8ec3f795309eba (patch) | |
tree | f02b0c42192ebcfdd99b4d3d636e28a4d91b0399 /docker/production/Dockerfile | |
parent | 2f69b6d04e399bd3efae0f12b8ad8c148fabf350 (diff) | |
download | Shaarli-1a216faecb5c114afbf36ecbac8ec3f795309eba.tar.gz Shaarli-1a216faecb5c114afbf36ecbac8ec3f795309eba.tar.zst Shaarli-1a216faecb5c114afbf36ecbac8ec3f795309eba.zip |
docker: switch to Alpine Linux for the master image
Relates to https://github.com/shaarli/Shaarli/issues/843
Changed:
- switch base image from Debian:Jessie to Alpine:3.6
- switch to PHP 7.1
- switch from supervisord to s6 to manage services
See:
- https://alpinelinux.org/
- https://wiki.alpinelinux.org/wiki/Nginx_with_PHP
- http://www.skarnet.org/software/s6/
- http://www.skarnet.org/software/s6/s6-svscan.html
- http://www.skarnet.org/software/s6/s6-svc.html
- http://www.skarnet.org/software/s6/s6-svstat.html
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'docker/production/Dockerfile')
-rw-r--r-- | docker/production/Dockerfile | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/docker/production/Dockerfile b/docker/production/Dockerfile deleted file mode 100644 index d0509115..00000000 --- a/docker/production/Dockerfile +++ /dev/null | |||
@@ -1,37 +0,0 @@ | |||
1 | FROM debian:jessie | ||
2 | MAINTAINER Shaarli Community | ||
3 | |||
4 | ENV TERM dumb | ||
5 | RUN apt-get update \ | ||
6 | && apt-get install --no-install-recommends -y \ | ||
7 | ca-certificates \ | ||
8 | curl \ | ||
9 | nginx-light \ | ||
10 | php5-curl \ | ||
11 | php5-fpm \ | ||
12 | php5-gd \ | ||
13 | php5-intl \ | ||
14 | supervisor \ | ||
15 | && apt-get clean | ||
16 | |||
17 | RUN sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php5/fpm/php.ini | ||
18 | RUN sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php5/fpm/php.ini | ||
19 | COPY nginx.conf /etc/nginx/nginx.conf | ||
20 | COPY supervised.conf /etc/supervisor/conf.d/supervised.conf | ||
21 | |||
22 | ADD https://getcomposer.org/composer.phar /usr/local/bin/composer | ||
23 | RUN chmod 755 /usr/local/bin/composer | ||
24 | |||
25 | WORKDIR /var/www | ||
26 | RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ | ||
27 | && mv Shaarli-master shaarli \ | ||
28 | && cd shaarli \ | ||
29 | && composer --prefer-dist --no-dev install | ||
30 | RUN rm -rf html \ | ||
31 | && chown -R www-data:www-data . | ||
32 | |||
33 | VOLUME /var/www/shaarli/data | ||
34 | |||
35 | EXPOSE 80 | ||
36 | |||
37 | CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/supervisord.conf"] | ||