Jump to contentJump to page navigation: previous page [access key p]/next page [access key n]
Applies to SUSE Linux Enterprise Server 15 SP2

13 Troubleshooting Edit source

13.1 Analyze Container Images with container-diff Edit source

In case a custom Docker Open Source Engine container image built on top of the SLE base container image is not working as expected, the container-diff tool can help you analyze the image and collect information relevant for troubleshooting.

container-diff makes it possible analyze image changes by computing differences between images and presenting the diff in a human-readable and actionable format. The tool can find differences in system packages, language-level packages, and files in a container image.

container-diff can handle local container images (using the prefix daemon://), images in a remote registry (using the prefix remote://), and images saved as .tar archives. You can use container-diff to compute the diff between a local version of an image and a remote version.

To install container-diff, run the sudo zypper in container-diff command.

13.1.1 Basic container-diff commands Edit source

The command container-diff analyze IMAGE runs a standard analysis on a single image. By default, it return a hash and size of the container image. For more information that can help you to identify and fix problems, use the specific analyzers. Use the --type parameter to specify the desired analyzer. Two most useful analyzers are history (returns a list of descriptions of how an image layer was created) and file (returns a list of file system contents, including names, paths, and sizes):

tux > sudo container-diff analyze --type=history daemon://IMAGE
tux > sudo container-diff analyze --type=file daemon://IMAGE

To view all available parameters and their brief descriptions, run the container-diff analyze --help command.

Using the container-diff diff command, you can compare two container images and examine differences between them. Similar to the container-diff analyze command, container-diff diff supports several parameters. The example command below compares two images and returns a list of descriptions of how IMAGE_2 was created from IMAGE_1.

tux > sudo container-diff diff daemon://IMAGE_1 daemon://IMAGE_2 --type=history

To view all available parameters and their brief descriptions, run the container-diff diff --help command.

Print this page