/plushcap/analysis/hasura/an-exhaustive-guide-to-writing-dockerfiles-for-node-js-web-apps-bbee6bd2f3c4

An Exhaustive Guide to Writing Dockerfiles for Node.js Web Apps

What's this blog post about?

This guide provides an exhaustive approach to writing Dockerfiles for Node.js web applications. It covers various aspects such as using appropriate base images (carbon for development and alpine for production), hot reloading during development with nodemon, optimizing Docker cache layers, serving static files, multi-stage production builds, and some pro tips like using COPY over ADD and handling CTRL-C kernel signals. The guide also includes examples of simple Dockerfile and .dockerignore file, hot reloading with nodemon, optimizations for better performance, serving static files, single-stage and multi-stage production builds.

Company
Hasura

Date published
Feb. 7, 2018

Author(s)
Praveen Durairaju

Word count
878

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.