Merge pull request #1113 from ArthurHoaro/docker/node-yarn-webpack

Docker: build frontend dependencies with node and yarn
This commit is contained in:
ArthurHoaro 2018-03-28 19:08:32 +02:00 committed by GitHub
commit ed6d1a7b80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 1 deletions

View 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 \