omi/packages/omi-ssr/Dockerfile

22 lines
422 B
Docker
Raw Normal View History

2019-03-28 16:46:49 +08:00
FROM node:8.10.0-alpine
# Set a working directory
WORKDIR /usr/src/app
COPY ./build/package.json .
COPY ./build/yarn.lock .
# Install Node.js dependencies
RUN yarn install --production --no-progress
# Copy application files
COPY ./build .
# Run the container under "node" user by default
USER node
# Set NODE_ENV env variable to "production" for faster expressjs
ENV NODE_ENV production
CMD [ "node", "server.js" ]