Browse all practice questions for the Docker Certified Associate (DCA) Certification Practice Test. Search by topic, open any question and review its full explanation, then test yourself in the practice quiz.

Docker Certified Associate (DCA) Certification Practice Exam – Prep & Study Guide course image
A Docker registry helps you manage and distribute container images across your teams.What is the benefit of using a Docker registry?A Docker Trusted Registry metadata backup includes registry configurations, repository details, and user permissions - not the Docker images.When performing a Docker Trusted Registry (DTR) metadata backup, which of the following is not included in the backup?Add the self-signed certificate to Docker's certs.d to securely authenticate with a registryWhich is a secure method for allowing a Docker client to authenticate with a registry that uses a self-signed certificate?Back up Docker Swarm metadata by stopping the daemon and saving /var/lib/docker/swarm on the managerHow can we back up the metadata for Docker Swarm?Back up Docker Trusted Registry metadata by running a DTR container with the built-in backup command.How should one back up Docker Trusted Registry (DTR) metadata?Backing Up Docker Swarm: Why saving /var/lib/docker/swarm on the manager mattersWhat is the method to backup Docker Swarm?Backing up Docker Trusted Registry: why backing up the entire image storage volume mattersWhat is the method for backing up images in the Docker Trusted Registry (DTR)?Change the default DNS server for Docker containers by configuring the Docker daemon DNS settingsHow do you change the default DNS server for Docker containers?Check a running Docker container's health status with docker inspect.How do you check the health status of a running container?CMD in Dockerfile: Setting the default command that runs when no command is providedWhat is the purpose of the CMD directive in a Dockerfile?Container orchestration explained: how deployment, scaling, and operations work togetherWhat is meant by container orchestration?Create a Docker volume using the docker volume create commandWhich command is used to create a new Docker volume?Create and run a Docker container from an image with docker run, and why it matters for everyday container workHow do you create a new Docker container from an image?Create your own private Docker registry by running the official registry image in a containerWhich statement is true regarding the creation of private Docker registries?Direct-lvm is the recommended devicemapper mode for production Docker deploymentsWhat is the recommended devicemapper mode for a production environment?Discover the exact details docker network inspect reveals about a specific networkWhat detail does 'docker network inspect' provide?Docker and cloud services work together to boost deployability across AWS, Azure, and Google CloudWhich of the following best describes the relationship between Docker and cloud services?Docker Compose helps you define and manage multi-container applications with a single YAML fileWhat is the purpose of 'docker-compose' in Docker?Docker Compose helps you run and coordinate multi-container Docker applicationsWhat is the purpose of the Docker Compose tool?Docker Compose makes it easy to define and manage multi-container applications with a single YAML file.What is the purpose of Docker Compose?Docker Compose makes it easy to orchestrate multi-container applications with a simple YAML file.What key feature does Docker Compose provide?Docker Compose makes it easy to run multi-container apps with a single YAML file.What is the purpose of Docker Compose?Docker Compose uses YAML to specify service dependencies.What is used to specify service dependencies in Docker Compose?Docker container images keep environments consistent, and that matters for the Docker Certified AssociateWhat aspect of Docker contributes to environment consistency?Docker containers deliver the core advantage of resource isolation and portabilityWhat is the main advantage of using Docker containers?Docker containers exist to run applications in isolated environments.What is the primary purpose of a Docker container?Docker containers make it easy to deploy applications quickly and consistently.What is a key benefit of using Docker containers?Docker Desktop helps developers manage containers with a simple, visual interface.What is the main purpose of Docker Desktop?Docker enables rapid container creation and deletion to scale applications.How does Docker facilitate scalability in applications?Docker Enterprise Edition provides built-in vulnerability scanning for registry images.What is required to scan Docker images for vulnerabilities within the registry?Docker helps isolate project dependencies for consistent development and deployment.What is a common application development use case for Docker?Docker Hub is the official Docker image registry and a key resource for working with containers.What is the name of the official Docker image registry?Docker Image vs Container: Understanding the Difference in Simple TermsWhat distinguishes a Docker image from a Docker container?Docker images are templates that create containers, ensuring your apps run the same everywhere.What is a Docker image?Docker in CI/CD pipelines delivers consistent environments that speed up delivery.What is a primary benefit of utilizing Docker in a CI/CD pipeline?Docker is a strong fit for microservices because it isolates each service and its dependencies.Why is Docker considered a good choice for microservices architecture?Docker is built for containerizing applications, delivering portable, consistent deployments.What is Docker primarily used for?Docker keeps data beyond a container’s life with volumes and bind mounts.How can persistent storage be managed in a Docker container?Docker mounts explained: absolute destination paths inside containers matter.Which option is NOT correct when mounting directories to a container?Docker networks let containers talk to each other while keeping isolation secure.Which of the following statements about Docker networks is true?Docker pull explained: it downloads a Docker image from a registry so you can run containers.What does the command 'docker pull' do?Docker run is the command that creates and runs a container in one step, with env vars, port mappings, and volumes.What command is used to run a Docker container?Docker Swarm delivers native clustering and orchestration for Docker containers.What does Docker Swarm provide for Docker containers?Docker system prune cleans up unused images, containers, and networks with a single commandWhich command is used to remove unused Docker images and containers?Docker testing shines when tests run in isolated containers.What is the main advantage of using Docker for testing applications?Docker uses namespaces to isolate applications on the same hostWhat does Docker use to isolate applications running on the same host?Docker volumes explained: you store application data and files, not container images or metadata.Which of the following can be stored in a Docker volume?Docker Volumes help you persist and manage data across containersWhat is the purpose of Docker Volumes?Docker volumes persist data even when containers stop.What is the primary purpose of Docker volumes?Dockerfile is the standard file for defining a Docker image.What file is used to define a Docker image?Enable debugging for a Docker container by running it in debug mode.What method can be used to enable debugging for a Docker container?Enable direct-lvm mode for devicemapper in Docker by setting dm.directlvm_device in /etc/docker/daemon.json.To enable direct-lvm mode for devicemapper, which configuration should be set?Here's how to list all running Docker containers with docker psWhich command would you use to list all running Docker containers?Here's how to view Docker images on your host with the docker images command.Which of the following commands is used to view the list of images on a Docker host?Here's how you view logs from a running Docker container using the docker logs commandWhat is the effect of using the docker logs command?How a Kubernetes Deployment rolling update creates a new ReplicaSet and gradually scales up updated pods while old pods scale down.What occurs during a rolling update using a Deployment in Kubernetes?How a Stack helps manage a multi-container app in Docker SwarmWhat should Erick use to manage an application consisting of multiple containers in a Docker Swarm?How Docker differs from traditional virtual machines: containers share the host OS kernelHow does Docker differ from traditional virtual machines?How docker exec lets you run a command inside a running container.What is the purpose of the Docker command 'docker exec'?How Docker keeps development and production in sync to accelerate CI/CD deploymentsIn a CI/CD environment, how does Docker enhance deployment processes?How Docker multi-stage builds optimize image size and speed up your build processWhat is the main purpose of using multi-stage builds in Docker?How Docker networks enable inter-container communication and why it matters for microservices.How is inter-container communication typically achieved in Docker?How docker run creates and starts a Docker container in one command.Which command is typically used to create a new Docker container?How docker stop stops a running container and why it mattersWhat command is used to stop a running Docker container?How Docker uses namespaces to share a single kernel across containersWhich technology allows Docker containers to share the same kernel?How docker-compose up starts the containers defined in a Docker Compose file.What is the purpose of the Docker command 'docker-compose up'?How Docker's overlay network driver connects containers across multiple hostsWhat does Docker's "overlay" network driver do?How Linux capabilities let Docker containers bind to low-numbered ports without root accessWhat Linux feature allows Docker containers to listen on ports lower than 1024 without root privileges?How multi-stage builds boost Docker image efficiency by copying only essential filesHow can multi-stage builds contribute to Docker image efficiency?How the docker scale command adjusts service replicas defined in a Docker Compose file.What does the 'docker scale' command do?How the Recycle reclaimPolicy makes a PersistentVolume reusable after a Pod and its PVC are deletedIf a Pod and its PersistentVolumeClaim are deleted, what configuration allows for automatic reuse of the PersistentVolume?How to add multiple insecure registries to Docker using the daemon.json fileWhich command can be used to add multiple insecure registries for Docker?How to attach to a running Docker container’s terminal with docker attachWhat command allows you to attach to a running container's terminal?How to build a Docker image from a Dockerfile using the docker build commandWhich command would you use to build a Docker image from a Dockerfile?How to build a Docker image from the Dockerfile in the current directory and tag it as my-custom-image:1What command would be used to build an image from a Dockerfile located in the current directory and tag it as my-custom-image:1?How to check Docker's system-wide information with docker infoWhat command is used to check Docker's system-wide information?How to check the health of a running Docker container using health checks and docker inspectHow can you check the health of a running Docker container?How to check your Docker version with the docker version commandHow do you find out which Docker version is installed on your machine?How to connect a Docker container to a specific network with the --network option in docker run.How do you connect a Docker container to a specific network?How to create a Docker volume named 'new-volume' without starting a containerHow can we create a volume called new-volume without running a container?How to create a new service in Docker Swarm using docker service create.Which command is used to create a new service in Docker Swarm?How to list services in a Docker stack named 'web-store' using docker stack services.Which command would you use to list services in a stack called 'web-store'?How to pass the node hostname to every Docker Swarm task with an environment variableWhich command allows passing the node hostname as an environment variable into each task in a service?How to remove a Docker volume using the docker volume rm commandWhat command would you use to remove a Docker volume?How to remove a stopped Docker container with docker rmWhat command is used to remove a stopped container?How to remove all stopped containers with docker container pruneWhich of the following commands can be used to remove all stopped containers?How to retrieve logs from a Docker container with the docker logs commandWhich command retrieves logs from a Docker container?How to run a BusyBox container with a custom command using docker runWhat command should Sara use to run a container with the busybox image, passing a custom command?How to run a Docker container and publish port 3001 to 5050 using docker run -d -p 5050:3001 foo.What command would Nancy use to run a container and publish its port 3001 to port 5050 on the host?How to run Docker containers in the background with the --detach flagWhich parameter is essential for running a container in the background?How to set environment variables in a Docker container with the --env option when you run dockerHow are environment variables set in a Docker container?How to stop a running Docker container gracefully and safely.How can you stop a running Docker container?How to use COPY in a Dockerfile to move files from your host into the container.When would you use the Dockerfile command COPY?How to view all running containers with docker psWhich command can display all running containers?How to view detailed Docker container information with the inspect commandWhich command is used to view the details of a specific Docker container?How to view logs from a running Docker containerWhat command would you use to view logs from a running container?Isolation lets Docker containers share a kernel securely.What feature of Docker allows containers to share the same kernel while running securely?Jenkins and Docker streamline CI/CD workflows to automate container lifecycles.What tool can be used alongside Docker to automate workflows?Learn how the Docker --cpus flag limits CPU usage for a container.Which configuration option is used to limit CPU usage for a Docker container?Learn how the Docker build command creates images from a DockerfileWhat command is used to build a Docker image?Learn how to check Docker storage driver configurations with the docker info command.If you want to check configurations related to Docker’s storage drivers, which command can you utilize?Learn how to create a Docker image from a Dockerfile using docker build.Which command allows you to create a new Docker image by executing a Dockerfile?Learn how to list all Docker images locally with docker images and understand the output.Which Docker command is used to list all Docker images on a local machine?Learn how to list all Docker networks with docker network ls.Which command is used to list all Docker networks?Learn how to mount a host directory into a Docker container with docker run --mount source=/my/path,destination=/tmp nginxWhat command would mount a directory from the host to a container?Learn how to remove a Docker container with docker rmWhat command is used to remove a Docker container?Learn how to remove all stopped containers with the docker container prune command.Which command is used to remove all stopped containers?Learn how to rotate the Docker Swarm unlock-key with docker swarm unlock-key --rotate.What command is used to rotate a Docker swarm unlock-key?Learn how to start an interactive container session with docker exec -it [container_id] bash.Which command is used to start a new interactive container session?Learn how to stop a running Docker container with the docker stop commandWhich command is used to stop a running Docker container?Learn how to use docker inspect --format to fetch only the fields you needWhich flag is used with docker inspect to return specific fields?Learn how to view the running services in a Docker stack using the docker stack services command.Which command would provide information about the running services in a Docker stack?Learn the exact command to remove a Docker volumeWhich command is used to remove a Docker volume?Learn to remove an unused Docker image with docker rmi and keep your Docker environment tidyWhich command would you use to remove an unused Docker image?List all replicas of a Docker Swarm service with docker service ps nginxTo list all replicas of a service called nginx, which command should be used?Listing all Docker containers with docker ps -a matters for everyday container management.What command would you use to list all running containers?Master Docker networks with the docker network command to manage container communication.What is the command used for managing Docker networks?Master the docker ps command to list containers and manage your Docker environmentWhich command would you use to list all Docker containers?Mount a host directory into a Docker container using docker run -v.Which command can be used to run a container while mounting a host directory?Rotate the swarm access key on a single Docker Swarm manager node for secure encryption.What is the required action for a manager node when rotating the swarm unlock-key?Run a Docker container from an image with docker run and start your app quicklyHow do you run a Docker container from an image?Running docker-compose up without -d puts containers in the foreground so you can watch logs in real timeWhat happens when 'docker-compose up' is run without the '-d' flag?Set a Docker Swarm service to five replicas with two dependable commandsWhich command can change the number of replicas in a service to 5? (Choose two)Setting container resource limits with --memory and --cpus in DockerHow can you define resource limits for a container?Starting a Docker container from an image with docker run for DCA topicsWhich command is used to start a Docker container from an image?Storing the Dockerfile in source control helps you track changes to a Docker image.How can changes made to a Docker image be tracked in source control?The EXPOSE directive in Dockerfiles documents ports and guides container networkingWhat is the primary purpose of the EXPOSE directive in a Dockerfile?There’s no single Docker command to generate a Dockerfile; you write it by hand for your app.What command generates a new Dockerfile?To configure Docker's direct-lvm settings, modify the /etc/docker/daemon.json file.What configuration file must be modified to change direct-lvm settings for Docker?To expand a PersistentVolumeClaim in Kubernetes, ensure the StorageClass has allowVolumeExpansion set to true.What must be true to expand a PersistentVolumeClaim in Kubernetes?Troubleshooting Docker containers: using docker logs and docker exec to diagnose issues effectivelyWhat Docker command helps in troubleshooting container issues?Understand docker ps -a: how it shows all containers, including those that are stoppedWhat is the output of 'docker ps -a'?Understand how the COPY command transfers files from the host into a Docker image during buildWhat does the 'COPY' command do in a Dockerfile?Understand how the docker pull command pulls images from registriesWhich command is used to pull an image from a Docker registry?Understand what docker volume ls does and how it helps manage Docker storageWhat does the command 'docker volume ls' do?Understand why the RUN instruction runs commands at build time in Dockerfiles and how it differs from CMD.What is a Dockerfile instruction that is used to run commands?Understanding Docker build context and why it matters for building Docker imagesWhat purpose does the 'docker build' context serve?Understanding Docker daemon.json: what it configures and why container environment variables aren’t globalWhich of the following is NOT a typical use for Docker daemon.json settings?Understanding Docker host networking: how the --network host option lets containers share the host networkWhat option in 'docker run' allows containers to share the host's network?Understanding Docker labels: how key-value pairs organize containers and other resourcesWhat are labels in Docker?Understanding Docker orchestration: coordinating multiple containers for seamless appsIn Docker, what does "orchestration" refer to?Understanding docker run -d and how detached mode lets containers run in the background.What does the flag '-d' do in a 'docker run' command?Understanding docker stats: how real-time container metrics keep your Docker environment healthy.What does 'docker stats' do?Understanding docker tag: how tagging an existing image helps versioning and deployment.What does the command 'docker tag' accomplish?Understanding docker-compose.yml and how it defines services, networks, and volumes for multi-container Docker apps.What is the purpose of 'docker-compose.yml'?Understanding Docker's Default Network Driver and Why the Bridge Matters for Containers.What is the default network driver in Docker?Understanding Docker's ENTRYPOINT: how it defines the main command a container runs.What is the role of the 'ENTRYPOINT' command in a Dockerfile?Understanding Docker's WORKDIR and why it matters for both builds and running containersWhich statement is true regarding the WORKDIR directive in Docker?Understanding ENTRYPOINT in a Dockerfile: the command that starts your containerWhat is the role of 'ENTRYPOINT' in a Dockerfile?Understanding how ADD differs from COPY in DockerfilesWhich of the following distinguishes the ADD directive from the COPY directive?Understanding how docker build creates a Docker image from a Dockerfile.Which Docker command allows you to build an image from a Dockerfile?Understanding how Docker creates named volumes with docker run -v and why it matters for data persistenceWhich command could result in the creation of a new named volume?Understanding how docker run --rm automatically removes containers after exit.What does the command 'docker run --rm' accomplish?Understanding how Docker stop gracefully shuts down a running container and why it matters for data integrityWhat is the outcome of running 'docker stop [container_id]'?Understanding how Docker volumes provide persistent storage for container dataWhich statement describes the purpose of Docker volumes?Understanding how the --attachable flag lets containers join a Docker overlay networkWhat flag is used when creating an overlay network to allow containers to attach later?Understanding how the -v flag in docker run performs volume binding for data persistence.When using the command 'docker run -v', what does the '-v' flag represent?Understanding how the ADD directive differs from COPY in DockerfilesIn what way does the ADD directive differ from the COPY directive in terms of functionality?Understanding how the Docker Swarm key retrieval command restores access to an encrypted swarm.What purpose does the command docker swarm unlock-key serve?Understanding the Docker CLI: how it interacts with the Docker daemon and manages containers.What is the function of the Docker CLI tool?Understanding the Docker writable layer: what changes stay in a container’s file systemWhat type of data is found in the writable file system layer created by a container?Understanding the FROM directive in Dockerfiles and why the base image mattersWhat does the FROM directive in a Dockerfile specify?Understanding the primary function of a Docker registry: storing and distributing imagesWhat is the primary function of a Docker registry?Understanding the role of a Dockerfile in defining the build steps for a Docker imageWhat is the role of a Dockerfile?Understanding the Sandbox in Docker CNM and How Each Container Gets Its Own Networking SpaceIn the Docker Container Network Model (CNM), what refers to an isolated unit for a single container's networking components?Understanding the structure of a Dockerfile and how it builds a Docker imageWhat is typically included in the structure of a Dockerfile?Understanding what the docker-compose down command does and why it mattersWhat is 'docker-compose down' used for?Unsigned images won’t run when Docker Content Trust is enabled.Which statement accurately reflects Docker Content Trust (DCT)?Update a running Docker container with docker update or by redeploying a new imageHow can you update a running container in Docker?Update an existing Docker image with a new tag or by pulling the latest version.How can you update an existing Docker image?Upload custom certificates to UCP and DTR using the web UIs for secure, streamlined management.What is the method for providing custom certificates to the Universal Control Plane (UCP) and Docker Trusted Registry (DTR)?Use the docker rm command to remove an existing Docker container.Which command is used to remove an existing container?Validate the host path first to ensure a successful mount of a host directory into a Docker containerHow can you ensure a successful mount of the host directory into a container?Volumes in a Kubernetes Pod configuration are defined in the Pod specification.Where do you specify volumes in a Kubernetes Pod configuration?What a Docker image really is and how it powers portable containers.Which of the following best describes a Docker image?What docker network ls reveals about the networks used by the Docker daemonWhat does the command 'docker network ls' do?What docker ps shows about running containers and why it mattersWhat does the 'docker ps' command display?What is a pod in Kubernetes and how it groups one or more containersWhat is a pod in Kubernetes?What the --privileged flag does in Docker and why it matters for container security.What does the '--privileged' flag do when running Docker containers?What the FROM instruction means in a Dockerfile and why it shapes your imagesWhat is the purpose of the 'FROM' instruction in a Dockerfile?What you need to know about Docker's default bridge network for containersWhat is the default network mode for Docker containers?Why a Docker registry matters: storing and distributing Docker images for seamless deploymentsWhat is the main function of a Docker registry?Why Docker containers share the host OS kernel and outpace traditional virtual machinesWhy is Docker preferred over traditional virtual machines for isolating applications?Why Docker helps you avoid dependency conflicts and speeds up deploymentWhich of the following is not a benefit of using Docker?Why marking a Docker Trusted Registry repository immutable prevents image overwritesHow can Tracy prevent her development team from overwriting images in a Docker Trusted Registry?Why the --insecure-registry flag is risky for Docker clients talking to a self-signed registryWhich method represents an insecure way to authenticate a Docker client to a registry with a self-signed certificate?Why the Docker host network driver lets containers share the host's network stack and what it means for performanceWhich network driver connects containers directly to a network stack on the host machine without any isolation?Why the docker stack prefix matters for coordinating multi-container apps with Docker SwarmTo perform a Docker operation that involves a stack, which command prefix is commonly used?Why the Node base image is the go-to choice for Dockerfiles in Node.js projects.What base image is usually referenced in Dockerfiles for Node.js applications?You name a Docker container using the docker run --name option.How can you specify a name for a Docker container?
Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy