Skip to content

Latest commit

 

History

History
669 lines (382 loc) · 12.8 KB

README.md

File metadata and controls

669 lines (382 loc) · 12.8 KB

1. Which command is used to place an image into a registry?

A) docker commit

B) docker tag

C) docker push

D) docker images

E) docker pull

2. Which network allows Docker Trusted Registry components running on different nodes to communicate and replicate Docker Trusted Registry data?

A) dtr-ol

B) dtr-hosts

C) dtr-br

D) dtr-vlan

3. which one is a valid command to run global service in docker swarm?

A) docker service create —mode global

B) docker swarm create —mode global

C) docker service create —global

D) docker swarm create —global

4. Which of the following is not an endpoint exposed by Docker Trusted Registry that can be used to assess the health of a Docker Trusted Registry replica?

A) /health

B) /nginx_status

C) /api/v0/meta/cluster_status

D) /replica_status

5. Which of the following endpoints exposed by Docker Trusted Registry can be used to assess the health of a Docker Trusted Registry replica?

A) /health

B) /api/health

C) /replica_status

D) /nginx/health

6. One of your developers is trying to push an image to the registry (dtr.example.com). The push fails with the error “denied: requested access to the resource is denied”. What should you verify the user has completed?

A) docker login -u <username> -p <password> dtr.example.com

B) docker registry login -u username -p <password> dtr.example.com

C) docker push <username>/<image:tag> dtr.example.com

D) docker images login -u <username> -p <password> dtr.example.com

7. You have been asked to backup the swarm state on a Linux installation. By default, where do Docker manager nodes store the swarm state and manager logs?

A) /var/run/docker/swarm

B) /var/lib/docker/swarm

C) /etc/docker/swarm

D) /run/docker/swarm

8. Which of the following will put the Docker engine into debug mode?

A) echo '{"debug": true}' > /var/lib/docker/daemon.json ; sudo kill -HUP <pid of
dockerd>

B) echo '{"debug": true}' > /etc/docker/config.json ; sudo kill -HUP <pid of
dockerd>

C) echo '{"debug": true}' > /var/lib/docker/config.json ; sudo kill -HUP <pid of
dockerd>

D) echo '{"debug": true}' > /etc/docker/daemon.json ; sudo kill -HUP <pid of
dockerd>

9. How do you deploy 4 new instances of nginx with a single command?

A) docker service create --replicas 4 --name myservice nginx

B) docker service create --instances 4 --name myservice nginx

C) docker service scale myservice=4 nginx

D) docker service scale --replicas 4 --name myservice nginx

10. You are using self-signed UCP certs and have a second DNS name that points to your internal controllers. When installing UCP, which flag should you use to add this additional name?

A) --internal-server-cert

B) --dns

C) --san

D) --external-server-cert

11. How to prevent any .pyc file in your entire docker context from being added inside your Docker?

A) \*\*.pyc

B) \*_/_.pyc

C) \*.pyc

D) /\*.pyc

12. Bob has configured his docker daemon to use syslog log driver by default. how can he run a container which uses son-file log driver?

A) By using “—log-opt-json-file along with the docker run

B) By using “—log-driver json-file” along with docker run

C) By using “—logger json-file” along with docker run

D) Its impossible

13. Which of the following commands can be used to see IPv4 subnet of the network?

A) docker network ls

B) docker info network

C) docker network info

D) docker network inspect

14. You want to ensure that a container doesn’t expect memory usage than a specified amount. Which of the following will be used by default by docker to achieve that ?

A) namespaces

B) selinux

C) cgroups

D) seccomp

15. Which of the following lvm mode should a production host using the devicemapper as a storage driver use?

A) loop-vm

B) overlay

C) direct-lvm

D) zfs

16. Correct order to backup docker ucp cluster?

A) swarm, ucp , dtr

B) dtr, ucp, swarm

C) ucp, dtr , swarm

D) swarm, dtr, ucp

17. Which of the following commands can take a tar file as an argument and add the extracted content into the image automatically?

A) COPY

B) ADD

C) ADD and COPY both

D) None of these

18. You want to get shell access into a running container with id. Which command should you use for it?

A) docker exec

B) docker ps

C) docker run

D) docker bash

19. Which TCP ports must be open on all nodes participating in the docker swarm?

A) 2377

B) 7946

C) 2377 and 7946

D) 2388

20. Docker content trust policy provides the ability to use __ for verifying integrity and the publisher of all the data received from a registry over any channel

A) end to end encryption

B) digital signatures

C) symmetric key encryption

D) a container

21. Which of the following is NOT true about secrets?

A) Secrets are encrypted during transit and also at rest

B) Secrets are available to swarm services and standalone container

C) Secrets are mounted in container’s filesystem directly

D) Secrets can be used for storing username and password

22. A global service is a service that runs ____ task/tasks on every node that meet the placement and resource constraints

A) Many

B) one

C) more than one

D) none

23. Which of the following statement is correct? Pick exactly two statements.

A) Image is a collection of immutable layers whereas container is a running instance of an image

B) Container can exist without the image but image cannot exist without container

C) Only one container can be spawned from a given image at a time

D) If multiple containers are spawned from the same image then they all use the same copy of image in memory


24. Overlay networks cannot be create if docker engine is not a manager node in docker swarm?


A) True

B) False


25. What are the two types of UCP client bundles?

A)	Docker CLI bundles and Docker web UI bundles

B)	Ops client bundles and dev client bundles

C)	Docker UCP client bundles and DTR client bundles

D)	Admin user certificate bundles and user certificate bundles

26 Docker security scan result is available in both UCP and DTR. True or false?

A) True

B) False

27 Docker security scan can be started by all users including those with read-only access. True or false?

A	True

B	False

28 What is the command that need to be executed to sign an image before pushing it to repository?

A) export TRUST_DOCKER_CONTENT=1

B) export TRUST_DOCKER_IMAGE=1

C) export SIGN_DOCKER_IMAGE=1

D) export DOCKER_CONTENT_TRUST=1

29 What is a grant made up of in Docker's Role Based Access Controls (RBAC)? (select three)

A) Certificate

B) Role

C) Subject

D) Resource collection

30 Where do you create Docker Role Based Access Controls (RBAC)?

A) Docker Machine

B) Universal Control Plane

C) Docker Compose

D) Docker Trusted Registry

31 Which of the followings are Docker Engine Security features? (select all that apply)

A) You can configure Docker’s trust features so that your users can push and pull trusted images

B) You can use certificate-based client-server authentication to verify a Docker daemon has the rights to access images on a registry

C) You can configure secure computing mode (Seccomp) policies to secure system calls in a container

D) You can protect the Docker daemon socket and ensure only trusted Docker client connections

32 What are the steps needed to sign images in a way that UCP trusts them? (select three)

A) Configure Notary client

B) Delegate signing to the keys in your UCP client bundle

C) Initialize trust metadata for the repository

D) Approve image sign on UCP

33 Where is the option to integrate Docker Enterprise with LDAP?

A) Docker Machine

B) Docker Trusted Registry

C) Docker Compose

D) Universal Control Plane


34 What is the difference between UCP workers and managers?

A) ucp-agent service automatically starts serving all UCP components in manager node, and only a proxy service in worker node

B) ucp-agent service automatically starts serving all UCP components in worker node, and only a proxy service in manager node


35 What is the default format of docker inspect output?

A) json

B) xml

C) html

D) yaml

36 What are the two types of docker swarm services?

A) replicated and global services

B) distributed and replicated services

C) local and global services

D) replicated and local services

37 What is the function of docker inspect command?

A) To inspect changes to files or directories on a container's filesystem

B) To manage Docker configs

C) To display system-wide information

D) To return low-level information on Docker objects

38 Which of the following is the docker command to enable autolock on an existing swarm cluster?

A) docker swarm --autolock=true

B) docker swarm update --autolock=true

C) docker swarm autolock

D) docker swarm update --autolock-swarm=true

39 What is the difference between a replicated and a global service?

A) Number of identical tasks can be specified for a replicated service. There is no pre-specified number of tasks for global service.

B) Replicated service can only be deployed on manager node. Global service can be deployed on both manager and worker node.

C) Replicated service runs one task on every node. Global service runs multiple task on every node.

D) Good candidates for replicated service are monitoring agents that you want to run on every node in the swarm. Good candidates for global service are http servers.

40 Which network driver type is best when the network stack should not be isolated from the Docker host, but you want other aspects of the container to be isolated?

A)	User-defined bridge networks

B)	Overlay networks

C)	Host networks

D)	Macvlan networks

Answers

  1. C.
    https://docs.docker.com/engine/reference/commandline/push/

  2. A.
    https://success.docker.com/article/how-to-test-the-dtr-ol-network

  1. A.
    Refer to the cli documentation https://docs.docker.com/engine/reference/commandline/service_create/

  2. D.

  3. A.

  4. A.

  5. B.

  6. D.

  7. A.

  8. C.

  9. B.
    https://codefresh.io/docker-tutorial/not-ignore-dockerignore/

  10. B.

  11. D.
    https://docs.docker.com/engine/reference/commandline/network_inspect/

  12. C.

  13. C.
    Is meant to be used in production environment.

  14. A.
    ucp - universal control plane dtr - docker trust registry swarm - nodes with manager https://docs.docker.com/ee/ucp/admin/backups-and-disaster-recovery/

  15. B.
    https://nickjanetakis.com/blog/docker-tip-2-the-difference-between-copy-and-add-in-a-dockerile

  16. A.
    docker exec -it bash is the command which you should use i stand for interactive and t stand for shell

  1. C.
    https://docs.docker.com/engine/swarm/swarm-tutorial/
  1. B.

  2. B.
    Secrets can be used only by swarm service not standalone https://docs.docker.com/engine/swarm/secrets/

  3. B.
    https://docs.docker.com/engine/swarm/services/#replicated-or-global-services

  4. A and D

  5. A.


    Overlay networks can’t exist if docker engine is not part of a swarm. So to create overlay network being a manager node in a swarm is a necessary condition. If we try creating overlay network from a non manager node we get the following error

    $ docker network create -d overlay network test.network Error response from daemon. Cannot create a multi host network from a worker node.Please create the network from a manager node.

  6. D.

    Reference: https://docs.docker.com/datacenter/ucp/2.2/guides/user/access-ucp/cli-based-access/

  7. B.

    Reference: https://docs.docker.com/datacenter/dtr/2.3/guides/user/manage-images/scan-images-for-vulnerabilities/#the-docker-security-scan-process

  8. B.

  9. D.

    Reference: https://docs.docker.com/datacenter/dtr/2.3/guides/user/manage-images/sign-images/

  10. C & D.

    Reference: https://docs.docker.com/datacenter/ucp/2.2/guides/access-control/grant-permissions/

  11. B.

    Reference: https://docs.docker.com/datacenter/ucp/2.2/guides/access-control/

  12. A , B , C, D.

    Reference: https://docs.docker.com/engine/security

  13. A , B , C.

    Reference: https://docs.docker.com/datacenter/dtr/2.3/guides/user/manage-images/sign-images/#sign-images-that-ucp-can-trust

  14. D.

    https://docs.docker.com/datacenter/ucp/2.2/guides/admin/configure/external-auth/

  15. A.

    https://docs.docker.com/datacenter/ucp/2.2/guides/architecture/#under-the-hood

  16. A.

  17. A.

  18. D.

  19. B.

  20. A.

  21. C.