Setting up the environment

To ensure that the build and test steps execute consistently, we should run them inside a container, which is an ephemeralpre-configured, isolated environment.

A container is similar to a virtual machine, but uses fewer resources and is quicker to provision. Creating containers is cheap; this allows us to create containers, run the tests, and then discard them afterward.

We will dive more in-depth into Docker in Chapter 17Migrating to Docker; for now, it's sufficient to understand that a Docker container provides an isolated and consistent environment for us to run our builds and tests.

Docker is the most popular container framework out there, and we will run our builds and tests inside Docker containers. In ...

Get Building Enterprise JavaScript Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.