Merge pull request #1072 from jbuck/vnext-node-10

Upgrade to Node v10
This commit is contained in:
Danny Coates 2019-01-07 12:57:26 -08:00 committed by GitHub
commit e1bbff0047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,15 +1,17 @@
FROM node:10-alpine
FROM node:10 AS builder
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
COPY package*.json /app/
WORKDIR /app
RUN npm install --production
RUN apk add --no-cache git
RUN addgroup -S -g 10001 app && adduser -S -D -G app -u 10001 app
COPY . /app
RUN chown -R app /app
FROM node:10-slim
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
USER app
WORKDIR /app
RUN mkdir static
RUN npm install --production && npm cache clean --force
COPY --chown=app:app --from=builder /app .
COPY --chown=app:app . .
ENV PORT=1443
EXPOSE $PORT
CMD ["npm", "run", "prod"]
CMD ["node", "server/bin/prod.js"]