From 6442a182f53bb120928b32c25067c5c9111afc26 Mon Sep 17 00:00:00 2001 From: Dimitar Dimitrov Date: Fri, 5 Jan 2024 17:51:58 +0200 Subject: [PATCH] [#307] Provide how to guide for verifying signed container images Signed-off-by: Dimitar Dimitrov --- .../verify-signed-container-images.md | 152 ++++++++++++++++++ 1 file changed, 152 insertions(+) create mode 100644 web/site/content/docs/how-to-guides/verify-signed-container-images.md diff --git a/web/site/content/docs/how-to-guides/verify-signed-container-images.md b/web/site/content/docs/how-to-guides/verify-signed-container-images.md new file mode 100644 index 00000000..03a22c47 --- /dev/null +++ b/web/site/content/docs/how-to-guides/verify-signed-container-images.md @@ -0,0 +1,152 @@ +--- +title: "Verify signed container images" +type: docs +description: > + Verify that container image is signed when creating a container from it in Kanto Container Management. +weight: 5 +--- + +By following the steps below you will sign a container image and push it to a local registry using a{{% refn "https://github.com/notaryproject/notation" %}}`notation`{{% /refn %}}. Then notation trust policy and Kanto Container Management be configured in a way that running containers from the signed image via kanto-cm CLI will be successfull, while running containers from unsigned images will fail. + +### Before you begin + +To ensure that your edge device is capable to execute the steps in this guide, you need: + +* If you don't have an installed and running Eclipse Kanto, follow {{% relrefn "install" %}} Install Eclipse Kanto {{% /relrefn %}} +* Installed {{% refn "https://notaryproject.dev/docs/user-guides/installation/cli/" %}} Notation CLI {{% /refn %}} +* Installed and running {{% refn "https://www.docker.com/products/docker-desktop/" %}} Docker {{% /refn %}} + +### Create an image and push it to a local registry using docker and than sign it with notation + +Run a local container registry: +```shell +sudo docker run -d -p 5000:5000 -e REGISTRY_STORAGE_DELETE_ENABLED=true --name registry registry +``` + +Build a dummy hello world image and push it to the registry: +```shell +cat <