A container image is a tar file containing other tar files. Internally, each tar file is a layer. Once all tar files have been extracted to a local filesystem, you can explore the details of the layers.
Using the docker tool, pull the layers of a Redis container image onto this filesystem.
docker pull redis:6.0.4-alpine3.11
Export the image into a raw tar format.
docker save redis:6.0.4-alpine3.11 > redis.tar
Create a scratch location to inspect the Redis files.
mkdir redis && cd redis
Extract the files from the tar.
tar -xvf ../redis.tar
All of the contents along with the layer tar files are now viewable.
The image includes the manifest.json file that defines the metadata about the image, such as version information and tag names. The schema for the manifest.json file follows the OCI specification. Inspect the manifest.
cat manifest.json | jq .
Extracting a layer will reveal the specific files contained for that layer.
mkdir last-layer && tar -xvf 014d4966196e17dec4032a93660d4be192558c0a654af6347a6e012742079d6c/layer.tar -C last-layer
Inspect the files in the last layer.
This single file makes sense because it's the last instruction in the Redis Dockfile that would cause a layer to be created, on line 100 here.