Skip to content

Commit

Permalink
Merge pull request #1113 from ArthurHoaro/docker/node-yarn-webpack
Browse files Browse the repository at this point in the history
Docker: build frontend dependencies with node and yarn
  • Loading branch information
ArthurHoaro authored Mar 28, 2018
2 parents c81f1af + 94abe0a commit ed6d1a7
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion docker/alpine/Dockerfile.master
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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 \
Expand Down

0 comments on commit ed6d1a7

Please sign in to comment.