npaste is a simple pastebin for text and images, supporting end-to-end encryption using GPG.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Dockerfile 750B

123456789101112131415161718192021222324252627282930313233343536
  1. FROM node:9.5.0 as builder
  2. ARG NODE_ENV=production
  3. ENV NODE_ENV $NODE_ENV
  4. WORKDIR /home/node/app
  5. COPY src/package*.json ./
  6. RUN npm install && npm cache clean --force
  7. FROM node:9.5.0-alpine as app
  8. ARG PORT=3000
  9. ENV PORT $PORT
  10. EXPOSE $PORT
  11. ARG NODE_ENV=production
  12. ENV NODE_ENV $NODE_ENV
  13. ARG NPM_CONFIG_PREFIX=/home/node/.npm-global
  14. ENV NPM_CONFIG_PREFIX=$NPM_CONFIG_PREFIX
  15. ENV PATH /home/node/.npm-global/bin:$PATH
  16. WORKDIR /home/node/app
  17. RUN npm install nodemon -g && mkdir -p /home/node/app/data && chown -R node:node /home/node/
  18. VOLUME /home/node/app/data
  19. COPY --chown=node:node --from=builder /home/node/app/node_modules node_modules/
  20. COPY --chown=node:node ./src ./src
  21. USER node:node
  22. WORKDIR /home/node/app/src
  23. CMD ["node", "bin/www"]