Skip to content

CICD-122 · Inspect image layer history ​

Encyclopedia · Docker image building · All snippets

Previous · CICD-121 · Next · CICD-123

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites Docker Engine or BuildKit on a trusted lab runner.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
docker image history --no-trunc web:ci

3. How it works ​

Layer history shows build command and size metadata. It is a diagnostic complement to inspecting the resulting files.

4. Verify the result ​

Review for suspicious commands or material. History alone is insufficient to check filesystem contents for accidental leakage.

Validation syntax-validated (Bash parse). Status definitions.