If you launch a container with '--network none' and later need to give it network access, what should you do?
Modify the container's configuration files to add network settings
Use the 'docker network connect' command to attach the container to an existing network
You cannot change the network mode once a container is created, you must recreate it
Restart the container with the desired network mode specified
To gracefully stop a running container, which command is recommended?
docker stop
docker halt
docker down
docker kill
What does the '-t' flag do when used with the 'docker build' command?
Specifies the Dockerfile to use
Defines the target platform for the image
Sets a tag for the built image
Enables verbose output during the build process
What is the command to gracefully stop a running Docker container?
docker stop <container_id>
docker kill <container_id>
docker down <container_id>
docker halt <container_id>
What is the function of the Docker Client?
It manages the Docker daemon on a remote host
It stores and distributes Docker images
It provides a user interface for interacting with the Docker daemon
It defines the application and its dependencies in a Dockerfile
You want to see a list of all running containers. Which command do you use?
docker ps
docker images
docker exec
docker run
Which Docker network driver allows a container to share the host's network stack, effectively making it appear as if the container's processes are running directly on the host?
Host
Macvlan
Bridge
Overlay
What does the COPY instruction do in a Dockerfile?
COPY
Copies files or directories from the host machine to the image.
Exposes a port from the container to the host.
Executes a command within the Docker image.
Sets the working directory for subsequent instructions.
Which command lists all Docker images present on your system?
docker image ls
docker show images
docker list images
When should you consider using the 'host' network mode for a Docker container?
When you want to limit the container's network access for security reasons
When you want to connect the container to a specific VLAN on the host
When you need to run a network monitoring tool inside the container
When you need to expose multiple ports from the container