liveBook · Manning

Build-share-run workflow

As explained in Learn Docker in a Month of Lunches, Second Edition

The build-share-run workflow is a container delivery process in which an application is packaged, published for reuse, and run by other users.

The build-share-run workflow packages an application into a Docker image, publishes that image for reuse, and lets other users run it in containers. The same process works for a small script or a multi-component application with configuration files and libraries, while Docker provides portability across supported computers. section 2.1

The workflow has three practical stages:

  • Build: package the application so it can run in a container. section 2.1
  • Share: publish the resulting image so other users can obtain it. section 2.1
  • Run: start a container from the image; Docker downloads it when necessary and reuses a local copy afterward. section 2.1 section 2.5

The Docker CLI sends commands through the Docker API to the Docker Engine. The Engine manages images, containers, networks, and other resources, so the same run workflow can release software such as Elasticsearch, SQL Server, or Ghost. section 2.5

Run a shared image

Running docker run diamol/ch02-hello-diamol:2e downloads the image if needed, starts the application in a container, and displays its output. Repeating the command runs another container from the cached image; its generated name and possibly its IP address differ. section 2.1

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Explains packaging, publishing, running, caching, and Docker components without detailing image-building implementation.
Examples
Uses the Hello World image, repeated docker run commands, platform-specific output, and distributable applications such as Elasticsearch and Ghost.
What it assumes
Assumes Docker installation and basic container commands while establishing foundational Docker concepts and terminology.
What you can do after
Apply it via the Docker CLI to run a shared image and recognize image caching and container-specific output.
How it connects
Connects Docker images, containers, Docker CLI, Docker API, Docker Engine, caching, and application portability.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.