Merge pull request #1113 from ArthurHoaro/docker/node-yarn-webpack
Docker: build frontend dependencies with node and yarn
This commit is contained in:
commit
ed6d1a7b80
1 changed files with 10 additions and 1 deletions
|
@ -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 \
|
||||
|
|
Loading…
Reference in a new issue