JavaScript (Node.js) and Docker: Application Containerization
300 pages
English
PDF
4.5

JavaScript (Node.js) and Docker: Application Containerization

JavaScript (Node.js) and Docker: Application Containerization

Author:

Year:

Summary:

Modern web development is unthinkable without containerization. Docker has become the de facto standard for packaging, delivering, and running applications. This book is a bridge between the world of JavaScript (Node.js) and infrastructure solutions. It doesn't just teach you the docker run command, but shows you how to think in the container paradigm, creating reliable, scalable, and easily portable services.



The book starts with the basics: you will learn how to write efficient Dockerfiles for Node.js, taking into account the specifics of layer caching, dependency management, and security. Next, you will dive into advanced topics:



  • Multi-stage builds — reducing the final image size by 10 times.
  • Docker Compose — orchestrating microservices (Node.js + MongoDB + Redis).
  • Networks and volumes — isolation, data persistence, and communication between containers.
  • Logging and monitoring — collecting metrics and logs from Node.js in Docker.
  • CI/CD for containers — automatic building and publishing of images on Git push.
  • Docker Swarm and Kubernetes — an introduction to orchestration for production.


Each chapter contains practical examples: from a simple REST API on Express to a full-fledged application with queues and background tasks. You will learn how to deal with "zombie processes", configure healthchecks, and write tests for containerized services.



Who is this book for?

  • Node.js developers who want to automate deployment and move away from "it works on my machine".
  • DevOps engineers looking for specifics of working with JavaScript stacks.
  • Team leads and architects planning a transition to microservices.
  • Freelancers who want to quickly deploy projects on VPS.


After reading, you will be able to: package any Node.js application into a lightweight image, set up a CI/CD pipeline, scale services horizontally, and feel confident working with Docker in production. The book is written in a lively style with a minimum of theory and a maximum of practice — all examples are tested on current versions of Node.js 20+ and Docker 24+.

Recommendations