Preface

When I first started working with Docker to build Node.js applications, I ran into a series of rather difficult situations.

Some of the questions and situations included:

  • How do I edit code in my container?
  • What about debugging?
  • Can I use Grunt, run my test and build processes in the container?
  • What if I need to restart the app when code changes?

These, and other questions, drove me to understand the relationship between a Docker image, container and my local computer as a host.

The result was a series of experiments that eventually turned into what I consider good practices within specific situation and circumstances.

As with most of my development knowledge and experience, I began to record these lessons as screencasts for WatchMeCode.

Over time, however, I began to realize that the tutorial approach to the screencasts was only delivering half of the solution that a developer needs, when using Docker.

Learning how to use the individual parts of Docker and it’s related tools is absolutely necessary, and the WatchMeCode screencasts cover this in great detail.

This book, however, aims to take the individual tools, bits of configuration and options, and bring them all together into solutions for specific problems.

Who Should Read This Book

If you’re new to Docker, this book is not for you.

I would recommend you start with the WatchMeCode Guide to Learning Docker if you need to learn Docker from the ground, up.

If you’re already using Docker to run services like MongoDB, RabbitMQ, Oracle, etc, and you’re looking for a resource to show you the basics of configuring Docker to run a Node.js application, this book is not for you, either.

The WatchMeCode Guide to Building Node.js Apps in Docker will show you how to configure a Docker container, run Node.js, get Express.js installed with npm install and more.

If you’re already using Docker, already know how to configure a basic Node.js and Express.js application in a container, but you find yourself running into difficult situations with debugging, reloading code, and running your tool set within Docker, this book is for you.

Within these recipes (chapters), you’ll find answers to the problems that plague developers beyond the basics of standing up a Docker container.

You’ll learn how to combine tools, command-line options, Dockerfile configuration items and more, into solutions for the unique problems that Node.js and JavaScript developers face when building applications within a Docker container.

How This Book Is Written

Each of the recipes (chapters) of this book will address a specific circumstance and problem, that requires a specific set of tools for a solution.

But, the goal of this book is to provide more than just text for you to read, to give you an idea of what to do.

These problems and solutions are taken directly from real-world experiences and problems, with solutions that can be applied to many different applications.

Many of these solutions are handled with configuration and code that can be re-used, as well. And whenever possible, these re-usable elements will be provided to you as additional resources outside of the book.

Where To Get The Code and Configuration

This is a work-in-progress, at the moment. It’s possible that a private Github repository will be created, or a simple .zip file will be included as a part of this book’s bundle.