2019-01-07 20:50:01 +00:00
|
|
|
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
|
2017-06-08 23:11:17 +00:00
|
|
|
|
2019-01-07 20:50:01 +00:00
|
|
|
FROM node:10-slim
|
|
|
|
RUN addgroup --gid 10001 app && adduser --disabled-password --gecos '' --gid 10001 --home /app --uid 10001 app
|
2017-06-23 00:20:41 +00:00
|
|
|
USER app
|
2017-06-08 23:11:17 +00:00
|
|
|
WORKDIR /app
|
2019-01-07 20:50:01 +00:00
|
|
|
COPY --chown=app:app --from=builder /app .
|
|
|
|
COPY --chown=app:app . .
|
2019-08-08 17:42:57 +00:00
|
|
|
RUN mkdir -p /app/.config/configstore
|
2019-06-03 19:25:09 +00:00
|
|
|
RUN ln -s dist/version.json version.json
|
2017-06-08 23:11:17 +00:00
|
|
|
|
2017-06-20 22:48:36 +00:00
|
|
|
ENV PORT=1443
|
|
|
|
EXPOSE $PORT
|
|
|
|
|
2019-01-07 20:50:01 +00:00
|
|
|
CMD ["node", "server/bin/prod.js"]
|