diff options
author | VirtualTam <virtualtam@flibidi.net> | 2018-06-17 01:02:50 +0200 |
---|---|---|
committer | VirtualTam <virtualtam@flibidi.net> | 2018-06-17 01:02:50 +0200 |
commit | 2a3fe990dd0730fce9465bbef6ad1a01054f775d (patch) | |
tree | 4abc8afd3bd63145e66f77f9279de7b246ceb7bd /docker/alpine/Dockerfile.master | |
parent | 7cf436cea4d05fe667c479be8b909c55c3f1da40 (diff) | |
download | Shaarli-2a3fe990dd0730fce9465bbef6ad1a01054f775d.tar.gz Shaarli-2a3fe990dd0730fce9465bbef6ad1a01054f775d.tar.zst Shaarli-2a3fe990dd0730fce9465bbef6ad1a01054f775d.zip |
docker: build the images from the local sources
Relates to https://github.com/shaarli/Shaarli/issues/1153
Signed-off-by: VirtualTam <virtualtam@flibidi.net>
Diffstat (limited to 'docker/alpine/Dockerfile.master')
-rw-r--r-- | docker/alpine/Dockerfile.master | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/docker/alpine/Dockerfile.master b/docker/alpine/Dockerfile.master deleted file mode 100644 index 7bbe1fb7..00000000 --- a/docker/alpine/Dockerfile.master +++ /dev/null | |||
@@ -1,63 +0,0 @@ | |||
1 | # Stage 1: | ||
2 | # - Get Shaarli sources | ||
3 | # - Resolve PHP dependencies with Composer | ||
4 | FROM composer:latest as composer | ||
5 | RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - \ | ||
6 | && mv Shaarli-master shaarli \ | ||
7 | && cd shaarli \ | ||
8 | && composer --prefer-dist --no-dev install | ||
9 | |||
10 | # Stage 2: | ||
11 | # - Frontend dependencies | ||
12 | FROM node:9.9-alpine as node | ||
13 | COPY --from=composer /app/shaarli shaarli | ||
14 | RUN cd shaarli \ | ||
15 | && yarn install \ | ||
16 | && yarn run build \ | ||
17 | && rm -rf node_modules | ||
18 | |||
19 | # Stage 3: | ||
20 | # - Shaarli image | ||
21 | FROM alpine:3.6 | ||
22 | LABEL maintainer="Shaarli Community" | ||
23 | |||
24 | RUN apk --update --no-cache add \ | ||
25 | ca-certificates \ | ||
26 | nginx \ | ||
27 | php7 \ | ||
28 | php7-ctype \ | ||
29 | php7-curl \ | ||
30 | php7-fpm \ | ||
31 | php7-gd \ | ||
32 | php7-iconv \ | ||
33 | php7-intl \ | ||
34 | php7-json \ | ||
35 | php7-mbstring \ | ||
36 | php7-openssl \ | ||
37 | php7-session \ | ||
38 | php7-xml \ | ||
39 | php7-zlib \ | ||
40 | s6 | ||
41 | |||
42 | COPY nginx.conf /etc/nginx/nginx.conf | ||
43 | COPY php-fpm.conf /etc/php7/php-fpm.conf | ||
44 | COPY services.d /etc/services.d | ||
45 | |||
46 | RUN rm -rf /etc/php7/php-fpm.d/www.conf \ | ||
47 | && sed -i 's/post_max_size.*/post_max_size = 10M/' /etc/php7/php.ini \ | ||
48 | && sed -i 's/upload_max_filesize.*/upload_max_filesize = 10M/' /etc/php7/php.ini | ||
49 | |||
50 | |||
51 | WORKDIR /var/www | ||
52 | COPY --from=node /shaarli shaarli | ||
53 | |||
54 | RUN chown -R nginx:nginx . \ | ||
55 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ | ||
56 | && ln -sf /dev/stderr /var/log/nginx/shaarli.error.log | ||
57 | |||
58 | VOLUME /var/www/shaarli/data | ||
59 | |||
60 | EXPOSE 80 | ||
61 | |||
62 | ENTRYPOINT ["/bin/s6-svscan", "/etc/services.d"] | ||
63 | CMD [] | ||