aboutsummaryrefslogtreecommitdiffhomepage
path: root/Dockerfile.armhf
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2018-07-28 11:19:53 +0200
committerArthurHoaro <arthur@hoa.ro>2018-07-28 11:19:53 +0200
commit7982c3ff183aa985177bdaeacda4feb22a739e00 (patch)
tree728e07251072f3a1df63c017c0dce54fa1acb390 /Dockerfile.armhf
parent2075321f6569dfa610905991b315aae1956b7f78 (diff)
parented7e1be12d65bdb1b924c7efb6a84fd591192c6c (diff)
downloadShaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.gz
Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.tar.zst
Shaarli-7982c3ff183aa985177bdaeacda4feb22a739e00.zip
Merge tag 'v0.10.0' into latest
Release v0.10.0
Diffstat (limited to 'Dockerfile.armhf')
-rw-r--r--Dockerfile.armhf48
1 files changed, 36 insertions, 12 deletions
diff --git a/Dockerfile.armhf b/Dockerfile.armhf
index 24695633..1185e2df 100644
--- a/Dockerfile.armhf
+++ b/Dockerfile.armhf
@@ -1,10 +1,38 @@
1FROM lsiobase/alpine.armhf:3.6 1# Stage 1:
2# - Copy Shaarli sources
3# - Build documentation
4FROM arm32v6/alpine:3.8 as docs
5ADD . /usr/src/app/shaarli
6RUN apk --update --no-cache add py2-pip \
7 && cd /usr/src/app/shaarli \
8 && pip install --no-cache-dir mkdocs \
9 && mkdocs build --clean
10
11# Stage 2:
12# - Resolve PHP dependencies with Composer
13FROM arm32v6/alpine:3.8 as composer
14COPY --from=docs /usr/src/app/shaarli /app/shaarli
15RUN apk --update --no-cache add php7-mbstring composer \
16 && cd /app/shaarli \
17 && composer --prefer-dist --no-dev install
18
19# Stage 3:
20# - Frontend dependencies
21FROM arm32v6/alpine:3.8 as node
22COPY --from=composer /app/shaarli /shaarli
23RUN apk --update --no-cache add yarn nodejs-current python2 build-base \
24 && cd /shaarli \
25 && yarn install \
26 && yarn run build \
27 && rm -rf node_modules
28
29# Stage 4:
30# - Shaarli image
31FROM arm32v6/alpine:3.8
2LABEL maintainer="Shaarli Community" 32LABEL maintainer="Shaarli Community"
3MAINTAINER Shaarli Community
4 33
5RUN apk --update --no-cache add \ 34RUN apk --update --no-cache add \
6 ca-certificates \ 35 ca-certificates \
7 curl \
8 nginx \ 36 nginx \
9 php7 \ 37 php7 \
10 php7-ctype \ 38 php7-ctype \
@@ -16,7 +44,6 @@ RUN apk --update --no-cache add \
16 php7-json \ 44 php7-json \
17 php7-mbstring \ 45 php7-mbstring \
18 php7-openssl \ 46 php7-openssl \
19 php7-phar \
20 php7-session \ 47 php7-session \
21 php7-xml \ 48 php7-xml \
22 php7-zlib \ 49 php7-zlib \
@@ -26,22 +53,19 @@ COPY .docker/nginx.conf /etc/nginx/nginx.conf
26COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf 53COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
27COPY .docker/services.d /etc/services.d 54COPY .docker/services.d /etc/services.d
28 55
29RUN curl -sS https://getcomposer.org/installer | php7 -- --install-dir=/usr/local/bin --filename=composer \ 56RUN rm -rf /etc/php7/php-fpm.d/www.conf \
30 && rm -rf /etc/php7/php-fpm.d/www.conf \
31 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ 57 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
32 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini 58 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
33 59
34 60
35WORKDIR /var/www 61WORKDIR /var/www
36RUN curl -L https://github.com/shaarli/Shaarli/archive/latest.tar.gz | tar xzf - \ 62COPY --from=node /shaarli /var/www/shaarli
37 && mv Shaarli-latest shaarli \ 63
38 && cd shaarli \ 64RUN chown -R nginx:nginx . \
39 && composer --prefer-dist --no-dev install \
40 && rm -rf ~/.composer \
41 && chown -R nginx:nginx . \
42 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ 65 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
43 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log 66 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
44 67
68VOLUME /var/www/shaarli/cache
45VOLUME /var/www/shaarli/data 69VOLUME /var/www/shaarli/data
46 70
47EXPOSE 80 71EXPOSE 80