]> git.immae.eu Git - github/shaarli/Shaarli.git/blame - Dockerfile.armhf
Merge pull request #1698 from ArthurHoaro/feature/plugins-search-filter
[github/shaarli/Shaarli.git] / Dockerfile.armhf
CommitLineData
e3af34d0
AM
1# Stage 1:
2# - Copy Shaarli sources
3# - Build documentation
ee07df35 4FROM arm32v6/alpine:3.10 as docs
e3af34d0 5ADD . /usr/src/app/shaarli
0b069406 6RUN apk --update --no-cache add py2-pip \
e3af34d0
AM
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
ee07df35 13FROM arm32v6/alpine:3.10 as composer
e3af34d0 14COPY --from=docs /usr/src/app/shaarli /app/shaarli
c0d750b9 15RUN apk --update --no-cache add php7-curl php7-mbstring php7-simplexml composer \
e3af34d0
AM
16 && cd /app/shaarli \
17 && composer --prefer-dist --no-dev install
18
19# Stage 3:
20# - Frontend dependencies
ee07df35 21FROM arm32v6/alpine:3.10 as node
e3af34d0
AM
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
ee07df35 31FROM arm32v6/alpine:3.10
2a3fe990 32LABEL maintainer="Shaarli Community"
b6b53143
I
33
34RUN apk --update --no-cache add \
35 ca-certificates \
b6b53143
I
36 nginx \
37 php7 \
38 php7-ctype \
a47656a2 39 php7-curl \
b6b53143
I
40 php7-fpm \
41 php7-gd \
42 php7-iconv \
43 php7-intl \
44 php7-json \
45 php7-mbstring \
46 php7-openssl \
b6b53143
I
47 php7-session \
48 php7-xml \
49 php7-zlib \
50 s6
51
2a3fe990
V
52COPY .docker/nginx.conf /etc/nginx/nginx.conf
53COPY .docker/php-fpm.conf /etc/php7/php-fpm.conf
54COPY .docker/services.d /etc/services.d
b6b53143 55
e3af34d0 56RUN rm -rf /etc/php7/php-fpm.d/www.conf \
b6b53143
I
57 && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \
58 && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini
59
60
61WORKDIR /var/www
e3af34d0
AM
62COPY --from=node /shaarli /var/www/shaarli
63
64RUN chown -R nginx:nginx . \
017baf57
A
65 && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \
66 && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log
b6b53143 67
e3af34d0 68VOLUME /var/www/shaarli/cache
b6b53143
I
69VOLUME /var/www/shaarli/data
70
71EXPOSE 80
72
73ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"]
74CMD []