What’s in a Docker image?

A Docker image is a directory hierarchy containing the initial contents of a running container. It is represented by a manifest file which lists its layers, and each layer is a gzipped tarfile (.tgz files). Layers are stored as blobs named by digests of their contents.

As a sanity check, we might want to view the contents of an image that we’ve pushed to DockerHub. Following these instructions, here’s a script that fetches an image using the DockerHub Registry API. It requires jq.

#!/bin/sh

Software developer in the SF Bay area. Electronic Design Automation, iOS apps, and now API tools for the world’s largest computer.