aboutsummaryrefslogtreecommitdiffhomepage
path: root/docker/alpine/Dockerfile.master
diff options
context:
space:
mode:
authorVirtualTam <virtualtam@flibidi.net>2017-04-09 14:50:13 +0200
committerVirtualTam <virtualtam@flibidi.net>2017-10-03 19:47:01 +0200
commit1a216faecb5c114afbf36ecbac8ec3f795309eba (patch)
treef02b0c42192ebcfdd99b4d3d636e28a4d91b0399 /docker/alpine/Dockerfile.master
parent2f69b6d04e399bd3efae0f12b8ad8c148fabf350 (diff)
downloadShaarli-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/alpine/Dockerfile.master')
-rw-r--r--docker/alpine/Dockerfile.master47
1 files changed, 47 insertions, 0 deletions
diff --git a/docker/alpine/Dockerfile.master b/docker/alpine/Dockerfile.master
new file mode 100644
index 00000000..58f7c6e7
--- /dev/null
+++ b/docker/alpine/Dockerfile.master
@@ -0,0 +1,47 @@
1FROM alpine:3.6
2MAINTAINER Shaarli Community
3
4RUN apk --update --no-cache add \
5 ca-certificates \
6 curl \
7 nginx \
8 php7 \
9 php7-ctype \
10 php7-curl \
11 php7-fpm \
12 php7-gd \
13 php7-iconv \
14 php7-intl \
15 php7-json \
16 php7-mbstring \
17 php7-openssl \
18 php7-phar \
19 php7-session \
20 php7-xml \
21 php7-zlib \
22 s6
23
24COPY nginx.conf /etc/nginx/nginx.conf
25COPY php-fpm.conf /etc/php7/php-fpm.conf
26COPY services.d /etc/services.d
27
28RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \
29 && rm -rf /etc/php7/php-fpm.d/www.conf \
30 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
31 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
32
33
34WORKDIR /var/www
35RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \
36 && mv Shaarli-master shaarli \
37 && cd shaarli \
38 && composer --prefer-dist --no-dev install \
39 && rm -rf ~/.composer \
40 && chown -R nginx:nginx .
41
42VOLUME /var/www/shaarli/data
43
44EXPOSE 80
45
46ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
47CMD []