How can you control access to images stored in a private Docker Registry?
By regularly updating the registry software to patch vulnerabilities
By configuring network firewalls to restrict access by IP address
By using encryption to secure images during transmission
By implementing authentication and authorization mechanisms within the registry
Which statement accurately describes a drawback of using bind mounts for sensitive data?
Bind mounts can expose parts of the host's filesystem to containers, potentially leading to security risks.
Bind mounts provide enhanced security for storing sensitive data.
Bind mounts are less efficient than Docker volumes for handling large data volumes.
Bind mounts are not supported in the latest versions of Docker.
How does Docker contribute to improved security in CI/CD?
Docker's containerization provides isolation, limiting the impact of vulnerabilities
Docker automatically encrypts data at rest and in transit
Docker eliminates the need for security updates by isolating applications
Docker enforces strict access control policies on application code
You want to execute 'ls -l' inside a container named 'app-server' and allocate a pseudo-TTY. Which command is correct?
docker exec -d app-server ls -l
docker exec -it app-server ls -l
docker exec app-server -it ls -l
docker run -it app-server ls -l
What is the primary advantage of using multi-stage builds in Docker?
To improve network performance during the build process.
To simplify the process of building complex applications.
To enable parallel execution of build steps.
To reduce the size of the final Docker image.
What is the purpose of the COPY --from instruction in a multi-stage Docker build?
COPY --from
To copy files from a remote repository to the current build stage.
To copy files from the current build stage to a later build stage.
To copy files from a previous build stage to the current build stage.
To copy files from the host machine to the current build stage.
Which command is used to initialize a Docker Swarm?
docker swarm up
docker swarm start
docker swarm init
docker swarm create
What is the primary function of a Docker Registry?
Storing and distributing Docker images
Managing network traffic between containers
Building Docker images
Running Docker containers in production
How can you view the logs of a specific container named 'webserver'?
docker logs webserver
docker show-logs webserver
docker logs -id webserver
docker inspect webserver | grep logs
How do you retrieve the IP address of a running Docker container using 'docker inspect'?
docker inspect <container_name> --format IP
docker inspect <container_name> | find 'IP'
docker inspect -f '{{.NetworkSettings.IPAddress}}' <container_name>
docker inspect <container_name> | grep IPAddress