Update build script to use build-target docker

This commit is contained in:
Christopher Hoskin
2018-05-18 13:55:33 +01:00
parent de74ec5094
commit a2165d85a0
4 changed files with 65 additions and 96 deletions
+7 -10
View File
@@ -1,24 +1,21 @@
FROM node:8.9.1 as app
COPY ./ /app
FROM node:6.9.5 as app
WORKDIR /app
RUN npm install
COPY package.json package-lock.json /app/
RUN npm install --quiet
COPY . /app
RUN npm run compile:all
FROM node:8.9.1
FROM node:6.9.5
COPY --from=app /app /app
WORKDIR /app
# All app and node_modules will be owned by root.
# The app will run as the 'node' user, and so not have write permissions
# on any files it doesn't need.
RUN ./install_deps.sh
USER node
CMD ["node","app.js"]