VersaWhiteboard/Dockerfile

39 lines
648 B
Docker
Raw Normal View History

FROM node:11 as base
# Create app directory
RUN mkdir -p /opt/app
WORKDIR /opt/app
# Install app dependencies
COPY ./package.json package-lock.json ./
RUN npm ci
# Bundle frontend
COPY src ./src
COPY assets ./assets
COPY config ./config
RUN npm run build
#####################
# Final image
#####################
FROM node:11-alpine
ENV NODE_ENV=prod
2018-02-08 17:45:07 +01:00
MAINTAINER cracker0dks
# Create app directory
RUN mkdir -p /opt/app
WORKDIR /opt/app
COPY ./package.json ./package-lock.json ./
RUN npm ci --only=prod
2018-02-08 17:45:07 +01:00
COPY scripts ./scripts
COPY --from=base /opt/app/dist ./dist
2018-02-08 17:45:07 +01:00
2019-02-04 19:53:23 +01:00
EXPOSE 8080
ENTRYPOINT ["node", "scripts/server.js", "--mode=production"]