1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
FROM node:14 ENV PORT=8080 ENV NODE_ENV=production WORKDIR /usr/src/app COPY package*.json ./ USER node RUN npm clean-install --only=production COPY . . EXPOSE ${PORT} CMD [ "node", "index.js" ]