Workflow

So, what's a typical workflow for running a program (or programs) inside a container?

First, you'd specify the setup of your environment and application inside a Dockerfile, where each line is a step in the setup process:

FROM node:8RUN yarnRUN yarn run buildCMD node dist/index.js

Then, you’d actually carry out the steps specified in the Dockerfile to generate an image. An image is a static, immutable file that contains the executable code of our application. The image is self-contained and includes our application code, as well as all of its dependencies such as system libraries and tools.

Then, you'd use Docker to run the image. A running instance of an image is a container. Your application runs inside that container.

By analogy, ...

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.