Software is complex.
A “simple” application may have dozens or hundreds of dependencies, libraries, modules and moving parts that have to be perfectly in sync across multiple software systems, services and computers.
But, hey! It's just “npm install”, right? What could possibly go wrong?
The reality of software is that you spend nearly as much time and effort on software configuration as you do in development.
You have to.
You need to reproduce that horrible bug. You have to get the system to work in the test environment. And you need another team member to stand up the app and be productive, right?
While it may not perform miracles or pull rabbits out of it's hat, Docker moves us a long way toward solving the “works on my machine” problem. Permanently.
And with this guide to building Node.js apps in Docker, you'll learn how you can take advantage of the power it packs.
Get up to speed on what Docker is, how to work with it and how to build your own containers. Learn how to run services that you previously had to install directly on your computer. See what it takes to write and debug code, directly in a container, and more.
This guide will show you everything you need to get up and running quickly.
Part 1: Installation and Management
In the first part of this guide, you'll learn how to install and configure Docker to run on your computer. Whether you're in Windows, Mac, or Linux, there is a version of Docker for you.
Beyond the basics of installation, you'll also see how to work with Docker images, from which you will create containers that run applications.
Lastly, you'll see the basics of managing your Docker images and containers, both on the command line and with the Kitematic GUI tool for Windows and Mac.
Docker – Installation & Management
Not a WatchMeCode member?
Join now and get instant access to everything!
Part 2: Running Services in Docker
After getting up and running with the basics of Docker, you'll find the most immediate success in migrating database systems and other services from your computer, into Docker containers.
With installation and use of Oracle, RabbitMQ and MongoDB, you'll see plenty of example of how Docker can keep your computer clean, while letting you run the services you need.
You'll also learn how to effectively use Docker's image tags, map TCP/IP ports from containers to your local system, mount local folders and files into Docker containers, and more.
Docker – Running Services in Containers
Need help remembering the command-line and options for Docker?
It's a list of the most common commands and options, in one easy to read page.
Part 3: Creating A Dockerfile and Image
Having services up and running in Docker containers gives you a lot of flexibility, but it doesn't yet give you the ability to build your own apps in Docker.
To get there, you need to understand how to build a Docker image from a Dockerfile.
This part of the guide will show you the basics of building your own Dockerfile, from the required commands in the file, to some options that will make things easier for you.
You'll see how to build an image and tear it down, all with the goal of making yourself comfortable in a Dockerfile before you get to the real application development work.
Basic Dockerfile Builds
A Dockerfile is your starting point for building and running your own Docker containers. But it's hard to remember all those configuration options.
You'll never need to worry about memorizing Dockerfile configuration options, again.
Now that you know how to run Docker images and containers, and build your own, it's time to get down to the real work of building an application in Docker.