Files
docker-docs/_vendor/github.com/docker/scout-cli/docs/scout_policy.md
David Karlsson 93616d55b5 scout: bump cli v1.0.2
Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
2023-09-26 10:11:22 +02:00

1.8 KiB

docker scout policy

Evaluate policies against an image and display the policy evaluation results (experimental)

Options

Name Type Default Description
--env string Name of the environment to compare to
-e, --exit-code Return exit code '2' if policies are not met, '0' otherwise
--org string Namespace of the Docker organization
-o, --output string Write the report to a file
--platform string Platform of image to pull policy results from

Description

The docker scout policy command evaluates policies against an image. The image is indexed into the Scout platform - if it wasn't already - and policies will run against it. The policy results may take a few minutes to become available.

Examples

Evaluate policies against an image and display the results

$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1

Evaluate policies against an image for a specific organization

$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1 --org dockerscoutpolicy

Evaluate policies against an image with a specific platform

$ docker scout policy dockerscoutpolicy/customers-api-service:0.0.1 --platform linux/amd64

Compare policy results for a repository in a specific environment

$ docker scout policy dockerscoutpolicy/customers-api-service --env production