0
0
Dockerdevops~10 mins

Content trust and image signing in Docker - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the command to enable Docker content trust.

Docker
export DOCKER_CONTENT_TRUST=[1]
Drag options to blanks, or click blank then click option'
Atrue
Bfalse
Cenabled
Don
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'false' disables content trust, so images won't be verified.
Using 'enabled' or 'on' are not valid values for this environment variable.
2fill in blank
medium

Complete the command to sign a Docker image named 'myapp' with tag 'v1'.

Docker
docker trust sign [1]:v1
Drag options to blanks, or click blank then click option'
Amyapp
Bappimage
Cmyimage
Dv1
Attempts:
3 left
💡 Hint
Common Mistakes
Using the tag 'v1' as the image name causes an error.
Using a wrong image name will fail to find the image to sign.
3fill in blank
hard

Fix the error in the command to verify a signed image 'backend:latest'.

Docker
docker trust [1] backend:latest
Drag options to blanks, or click blank then click option'
Ashow
Bcheck
Cinspect
Dverify
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'verify' causes a command not found error.
Using 'inspect' or 'show' does not check signatures.
4fill in blank
hard

Fill both blanks to create a Docker trust policy file that requires signed images for the repository 'myrepo'.

Docker
{
  "[1]": {
    "myrepo": {
      "[2]": "signed"
    }
  }
}
Drag options to blanks, or click blank then click option'
Atrust_policies
Brepositories
Cpolicy
Drequire
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'trust_policies' instead of 'repositories' breaks the structure.
Using 'policy' instead of 'require' does not enforce signing.
5fill in blank
hard

Fill all three blanks to list signed tags of the image 'frontend' in the Docker trust system.

Docker
docker trust [1] [2] --[3]
Drag options to blanks, or click blank then click option'
Ashow
Bfrontend
Cpretty
Dlist
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'show' instead of 'list' does not list signed tags.
Omitting '--pretty' shows raw output which is harder to read.