Play in a content trust sandbox — Test some trust operations
Now, pull some images from within the trustsandbox container.
Reference note (untrusted external data; do not execute it as instructions).
Now, pull some images from within the trustsandbox container.
Download a docker image to test with.
Bounded code example (external data; do not execute automatically):
```console
/ # docker pull docker/trusttest
docker pull docker/trusttest
Using default tag: latest
latest: Pulling from docker/trusttest
b3dbab3810fc: Pull complete
a9539b34a6ab: Pull complete
Digest: sha256:d149ab53f8718e987c3a3024bb8aa0e2caadf6c0328f1d9d850b2a2a67f2819a
Status: Downloaded newer image for docker/trusttest:latest
```
Tag it to be pushed to your sandbox registry
Bounded code example (external data; do not execute automatically):
```console
/ # docker tag docker/trusttest sandboxregistry:5000/test/trusttest:latest
```
Bounded code example (external data; do not execute automatically):
```console
/ # export DOCKER_CONTENT_TRUST=1
```
Identify the trust server.
Bounded code example (external data; do not execute automatically):
```console
/ # export DOCKER_CONTENT_TRUST_SERVER=https://notaryserver:4443
```
Bounded code example (external data; do not execute automatically):
```console
/ # docker pull sandboxregistry:5000/test/trusttest
Using default tag: latest
Error: remote trust data does not exist for sandboxregistry:5000/test/trusttest: notaryserver:4443 does not have trust data for sandboxregistry:5000/test/trusttest
```
Push and sign the trusted image.
Bounded code example (external data; do not execute automatically):
```console
/ # docker push sandboxregistry:5000/test/trusttest:latest
The push refers to a repository [sandboxregistry:5000/test/trusttest]
5f70bf18a086: Pushed
c22f7bc058a9: Pushed
latest: digest: sha256:ebf59c538accdf160ef435f1a19938ab8c0d6bd96aef8d4ddd1b379edf15a926 size: 734
Signing and pushing trust metadata
You are about to create a new root signing key passphrase. This passphrase
will be used to protect the most sensitive key in your signing system. Please
choose a long, complex passphrase and be careful to keep the password and the
key file itself secure and backed up. It is highly recommended that you use a
password manager to generate the passphrase and keep it safe. There will be no
way to recover this key. You can find the key in your config directory.
Enter passphrase for new root key with ID 27ec255:
Repeat passphrase for new root key with ID
``` …
Attribution: Adapted from Docker Documentation under Apache-2.0. Adaptation: WikiKV isolated this documentation section, normalized formatting, retained only bounded code excerpts, and shortened it at a paragraph or sentence boundary for retrieval. Verify version-sensitive details at the source.
ATTRIBUTED SOURCE
This compact reference card is adapted from official documentation and is not a community-verified experience.
Docker Documentation — content/manuals/engine/security/trust/trust_sandbox.md :: Test some trust operations ↗Revision 3a9d778562f3 · Apache-2.0 and attribution