Last active
October 23, 2018 15:28
-
-
Save mbenedettini/8b92c5fb8498e35e79ff475a51fc38bc to your computer and use it in GitHub Desktop.
Cache node_modules across builds
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM marianobe/node-base:latest | |
EXPOSE 3000 3001 3002 | |
RUN npm install -g --unsafe-perm @angular/cli pushstate-server | |
RUN mkdir -p /usr/src/app/client | |
WORKDIR /usr/src/app | |
# Loopback app | |
COPY package.json /usr/src/app | |
COPY package-lock.json /usr/src/app | |
RUN cd /usr/src/app && npm ci | |
# Angular app | |
COPY ./client/package.json /usr/src/app/client | |
COPY ./client/package-lock.json /usr/src/app/client | |
RUN cd /usr/src/app/client && npm ci | |
COPY . /usr/src/app | |
WORKDIR /usr/src/app/client | |
RUN npm run build |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment