You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There has been some requests for signing images. While it is still an open discussion (see buildpacks/pack#268 and buildpacks/lifecycle#180), it is currently possible to sign images, once created, using notary v1. Add a walkthrough to sign an issue built through pack.
What questions should this documentation answer?
What is a signed image?
How can I sign an image?
Is this through pack, or a separate tool?
Who is the target audience for this documentation?
App Developer
Operator
Security folk
Additional Information
xpost from private issue, researched by @djoyahoy:
Here are the steps to integrate with notary outside the docker CLI:
Setup
docker pull alpine
start a local docker registry with docker run -p 5000:5000 --restart=always --name registry registry:2
git clone the notary project from github and go install the notary binary
start a local notary server with cd notary && docker-compose up
Note: The first command is a docker CLI command because this is how our users would most likely add their keys to Notary. However, if they are well versed with Notary, they can add the keys with the Notary CLI as well.
docker trust signer add --key test.pub test localhost:5000/bar
This seems like it's a little out of scope for our project. At least until we have more integrated support for signing. IMO, this is still valuable but probably better served as a blog post.
Summary
There has been some requests for signing images. While it is still an open discussion (see buildpacks/pack#268 and buildpacks/lifecycle#180), it is currently possible to sign images, once created, using notary v1. Add a walkthrough to sign an issue built through
pack
.What questions should this documentation answer?
Who is the target audience for this documentation?
Additional Information
xpost from private issue, researched by @djoyahoy:
Here are the steps to integrate with notary outside the docker CLI:
Setup
docker pull alpine
docker run -p 5000:5000 --restart=always --name registry registry:2
git clone
the notary project from github andgo install
the notary binarycd notary && docker-compose up
export DOCKER_CONTENT_TRUST_SERVER=https://localhost:4443
Note : Run all notary commands from the notary directory to access the
root-ca.crt
Testing Notary with the Docker CLI
docker trust key generate test
docker trust signer add --key test.pub test localhost:5000/foo
notary -s https://localhost:4443 -d ~/.docker/trust/ --tlscacert ./fixtures/root-ca.crt delegation list localhost:5000/foo
docker tag alpine localhost:5000/foo:alpine
docker trust sign localhost:5000/foo:alpine
notary -s https://localhost:4443 -d ~/.docker/trust/ --tlscacert ./fixtures/root-ca.crt list localhost:5000/foo
docker trust inspect --pretty localhost:5000/foo:alpine
docker rmi localhost:5000/foo:alpine
DOCKER_CONTENT_TRUST=1 docker pull localhost:5000/foo:alpine
docker trust revoke localhost:5000/foo:alpine
docker rmi localhost:5000/foo:alpine
DOCKER_CONTENT_TRUST=1 docker pull localhost:5000/foo:alpine
Testing Notary with the Notary CLI
Note: The first command is a docker CLI command because this is how our users would most likely add their keys to Notary. However, if they are well versed with Notary, they can add the keys with the Notary CLI as well.
docker trust signer add --key test.pub test localhost:5000/bar
docker tag alpine localhost:5000/bar:alpine
docker push localhost:5000/bar:alpine
notary -s https://localhost:4443 --tlscacert ./fixtures/root-ca.crt -d ~/.docker/trust addhash -p localhost:5000/bar alpine <bytes> --sha256 <digest> -r targets/test
notary -s https://localhost:4443 --tlscacert ./fixtures/root-ca.crt -d ~/.docker/trust/ list localhost:5000/bar -r targets/test
docker rmi localhost:5000/bar:alpine
DOCKER_CONTENT_TRUST=1 docker pull localhost:5000/bar:alpine
notary -s https://localhost:4443 --tlscacert ./fixtures/root-ca.crt -d ~/.docker/trust/ remove -p localhost:5000/bar alpine -r targets/test
docker rmi localhost:5000/bar:alpine
DOCKER_CONTENT_TRUST=1 docker pull localhost:5000/bar:alpine
The text was updated successfully, but these errors were encountered: