Skip to content
loading...

re: How To Build a Node.js Application with Docker [Quickstart] VIEW POST

FULL DISCUSSION
 

To keep the image as small as possible you can delete the cache npm builds

RUN npm install --production && npm cache clean --force

And by putting "fix" settings that don't change, like

EXPOSE 8080

towards the beginning of the Dockerfile you can sometimes save build time because docker can build upon existing layers that didn't change.

code of conduct - report abuse