DEV Community

Cover image for Docker SBOM
NaveenKumar Namachivayam ⚡
NaveenKumar Namachivayam ⚡

Posted on • Originally published at qainsights.com

5 2

Docker SBOM

Couple of months ago, Docker announced an experimental command called docker sbom which will display the packaging list of an image. In this blog article, we will dive into sbom, docker sbom and more.

What is SBOM?

A Software Bill of Materials (SBOM) is a term you often hear or read when it comes to software supply chain. An SBOM holds metadata about the software package, content, license information, copyright, and more.Think of it as an inventory or list of ingredients in a package.

Sample Label for Frozen Lasagna
Sample Label for Frozen Lasagna

SBOM brings transparency and security in the software supply chain.

Docker SBOM

Docker SBOM is an experimental feature which is available in Docker. Launch the terminal and issue docker sbom <image>:<tag>. By default, the output will be in table format as shown below.

Docker SBOM
Docker SBOM

To print the SBOM in CycloneDX and SPDX format, issue the below commands respectively.

# SPDX JSON
docker sbom --format spdx-json qainsights/jpetstore:latest

# CycloneDX JSON
docker sbom --format cyclonedx-json qainsights/jpetstore:latest

To save the output to a file, issue the below command :

docker sbom --format spdx-json --output sbom.json qainsights/jpetstore

How it works?

To generate the SBOM, docker needs to scan the image. It uses Syft to perform scanning as of now. The process may change in the future.

Syft is a Go based CLI tool to generate SBOM.

syft qainsights/jpetstore

Install as a Plugin

To install SBOM as a plugin, issue the below command which will install the docker-sbom:

curl -sSfL https://raw.githubusercontent.com/docker/sbom-cli-plugin/main/install.sh | sh -s --

Final Thoughts

Docker SBOM is still in its early phase. But if you are into containerization or DevOps tasks, docker sbom helps you to generate the package contents, dependencies, and more using a single command.

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

The Most Contextual AI Development Assistant

Pieces.app image

Our centralized storage agent works on-device, unifying various developer tools to proactively capture and enrich useful materials, streamline collaboration, and solve complex problems through a contextual understanding of your unique workflow.

👥 Ideal for solo developers, teams, and cross-company projects

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay