diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-03-28 19:08:32 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-28 19:08:32 +0200 |
commit | ed6d1a7b80283b41bb61f44b543ea8d96172f045 (patch) | |
tree | ed229671af209044d7d809d234243ca91a646c85 /docker/alpine | |
parent | c81f1afc0a3a16daf98741a63c7524b27835da99 (diff) | |
parent | 94abe0a65302076f814cbaf3be32180ff5a5c728 (diff) | |
download | Shaarli-ed6d1a7b80283b41bb61f44b543ea8d96172f045.tar.gz Shaarli-ed6d1a7b80283b41bb61f44b543ea8d96172f045.tar.zst Shaarli-ed6d1a7b80283b41bb61f44b543ea8d96172f045.zip |
Merge pull request #1113 from ArthurHoaro/docker/node-yarn-webpack
Docker: build frontend dependencies with node and yarn
Diffstat (limited to 'docker/alpine')
-rw-r--r-- | docker/alpine/Dockerfile.master | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/docker/alpine/Dockerfile.master b/docker/alpine/Dockerfile.master index 0472947f..7bbe1fb7 100644 --- a/docker/alpine/Dockerfile.master +++ b/docker/alpine/Dockerfile.master | |||
@@ -8,6 +8,15 @@ RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf - | |||
8 | && composer --prefer-dist --no-dev install | 8 | && composer --prefer-dist --no-dev install |
9 | 9 | ||
10 | # Stage 2: | 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: | ||
11 | # - Shaarli image | 20 | # - Shaarli image |
12 | FROM alpine:3.6 | 21 | FROM alpine:3.6 |
13 | LABEL maintainer="Shaarli Community" | 22 | LABEL maintainer="Shaarli Community" |
@@ -40,7 +49,7 @@ RUN rm -rf /etc/php7/php-fpm.d/www.conf \ | |||
40 | 49 | ||
41 | 50 | ||
42 | WORKDIR /var/www | 51 | WORKDIR /var/www |
43 | COPY --from=composer /app/shaarli shaarli | 52 | COPY --from=node /shaarli shaarli |
44 | 53 | ||
45 | RUN chown -R nginx:nginx . \ | 54 | RUN chown -R nginx:nginx . \ |
46 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ | 55 | && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \ |