liveBook · Manning

REST

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

A REST API is an HTTP interface that exposes resources and operations according to the principles of representational state transfer.

A REST API is an HTTP interface that exposes resources and operations according to representational state transfer. It gives clients a standard way to request information or perform actions without requiring the client and service to share an implementation. section 2.5

Docker uses this pattern to separate its command-line client from the Docker Engine. The CLI sends HTTP requests to the Engine API, which manages containers, images, networks, and other resources. The same API can be reached locally or from another computer when configured and secured for remote access. section 2.5

A REST API becomes practical when you can identify the service, resource, and request workflow:

  • Use the documented API endpoint rather than assuming the command-line client is the only interface. section 5.6
  • Inspect the resource you need, such as image tags or a manifest, before attempting an operation. section 5.6
  • Follow API-specific requirements, including request headers needed for operations such as deleting an image. section 5.6

A containerized REST API

A Java web application exposes a REST API that fetches NASA's Astronomy Picture of the Day, caches the result locally, and returns the picture details as JSON. Build the image, run it with Docker, and browse to http://localhost:800/image to verify the response. section 4.2

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

How deep it goes
Explains client-server interaction and practical request workflows, but does not detail REST constraints or HTTP semantics.
Examples
Demonstrates a cached NASA image service and registry operations for listing tags, reading manifests, and deleting images.
What it assumes
Assumes basic Docker usage while showing that the CLI is an API client and that APIs can be accessed remotely.
What you can do after
Apply it via Docker CLI workflows and documented registry requests to inspect and manage container resources.
How it connects
Connects REST APIs with HTTP, Docker Engine, Docker CLI, Docker Registry API, containers, images, and resource management.

Also explained in

Compare how 22 books explain REST →

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.