I am new to container signing.
Here is what I experimented.
- Followed instructions from the GitHub Action for
cosign
to sign container images using OIDC token. This works. Next steps in my GH Action publishes the image to GHCR. - Did
docker pull
against the signed image. - Ran
docker trust inspect
against the signed image. - Empty array results - see below.
[]
No signatures or cannot access ghcr.io/nsubrahm/image:tag
The “cannot access” part is not right since, docker pull
went through.
My questions:
- Signing the container image with
cosign
and verifying the same withdocker trust inspect
- is this supposed to work? - If not, should images signed by
cosign
be verified bycosign
only? - Out of curiosity, would the other way around work too? For example,
docker trust sign
followed bycosign verify
. - My goal is to launch my application via
docker compose up -d
with signed container images only. Can you advise a strategy for the same, please? Or, point me to resources?