Building a container for a Node.js process
In Chapter 10, Building Microservice Systems, we developed a small system.
In this recipe, we're to take the adderservice
as we left it at the end of Chapter 10, Building Microservice Systems, in the Adding a Queue Based Service recipe, and create a container for it.
Getting ready
Getting ready
We will be using the container engine for this recipe, so we should have this installed on our system. If we don't yet have this installed, we can head over to http://www.docker.com and install the appropriate binary for our system. Docker supports Linux, Windows, and Mac natively.
We can check that Docker was installed successfully by opening a shell and running the following command:
$ docker run hello-world
This command will pull the hello-world
image from Docker Hub – a central repository of public Docker images, create a new container from that image, and run it. The executable within the container will output hello
from Docker along with some help text...