]> git.immae.eu Git - github/shaarli/Shaarli.git/commitdiff
Docker: build frontend dependencies with node and yarn 1113/head
authorArthurHoaro <arthur@hoa.ro>
Mon, 26 Mar 2018 18:24:01 +0000 (20:24 +0200)
committerArthurHoaro <arthur@hoa.ro>
Tue, 27 Mar 2018 17:05:19 +0000 (19:05 +0200)
docker/alpine/Dockerfile.master

index 0472947f54d90854b9966185daaf9da7d341df73..7bbe1fb77f66e46afdc80906ba2c0f6fe9a5a08b 100644 (file)
@@ -8,6 +8,15 @@ RUN curl -L https://github.com/shaarli/Shaarli/archive/master.tar.gz | tar xzf -
     && composer --prefer-dist --no-dev install
 
 # Stage 2:
+# - Frontend dependencies
+FROM node:9.9-alpine as node
+COPY --from=composer /app/shaarli shaarli
+RUN cd shaarli \
+    && yarn install \
+    && yarn run build \
+    && rm -rf node_modules
+
+# Stage 3:
 # - Shaarli image
 FROM alpine:3.6
 LABEL maintainer="Shaarli Community"
@@ -40,7 +49,7 @@ RUN rm -rf /etc/php7/php-fpm.d/www.conf \
 
 
 WORKDIR /var/www
-COPY --from=composer /app/shaarli shaarli
+COPY --from=node /shaarli shaarli
 
 RUN chown -R nginx:nginx . \
     && ln -sf /dev/stdout /var/log/nginx/shaarli.access.log \