General Docker X
1.
How do you limit the bandwidth usage of a Docker container?
docker run --network=container:existing_container_id --network-alias alias_name
docker limit-bandwidth container_id
docker run --net=container:existing_container_id --net-alias alias_name
docker create --network=container:existing_container_id --network-alias alias_name
2.
What is the purpose of the 'docker checkpoint' command?
To configure Docker network settings
To stop and remove containers
To view the logs of a Docker container
To create a checkpoint of a running container
3.
What is the function of the 'docker system events' command?
To display real-time system events
To show detailed information about running containers
To list all Docker containers
To inspect a Docker image
4.
What is the purpose of the 'docker plugin install' command?
To configure Docker volumes
To install a Docker plugin
To set up a new Docker network
To create a Docker swarm
5.
How do you enable experimental features in Docker?
Set the 'DOCKER_EXPERIMENTAL' environment variable to 'true'
Edit the /etc/docker/experimental file
Add the '--experimental' option to the Docker daemon configuration
Run the 'docker enable-experimental' command
6.
How can you enable the BuildKit backend for building Docker images?
Set the 'DOCKER_BUILDKIT=1' environment variable
Edit the /etc/docker/buildkit file
Add the '--buildkit' option to the Docker build command
Run the 'docker enable-buildkit' command
7.
How do you specify the health check interval for a Docker container?
docker healthcheck --interval
docker run --health-interval
docker create --health-interval
HEALTHCHECK --interval
8.
How can you enable Docker Content Trust globally?
Add the '--content-trust' option to the Docker daemon configuration
Edit the /etc/docker/content-trust file
Set the 'DOCKER_CONTENT_TRUST' environment variable to '1'
Run the 'docker enable-content-trust' command
9.
How can you run a command in a new container with the same network namespace as an existing container?
docker run --net container:existing_container_id command
docker exec --net container:existing_container_id command
docker start --net container:existing_container_id command
docker create --net container:existing_container_id command
10.
How can you run a command inside a Docker container as a different user?
docker execute -u username container_id command
docker run -u username command container_id
docker exec -u username container_id command
docker start -u username container_id command
11.
What is the purpose of the 'docker context' command?
To configure Docker networking
To create a new Docker context
To switch between Docker contexts
To manage Docker volumes
12.
How can you share your local Docker context with a remote Docker daemon?
docker share context remote --docker host=ssh://user@remote
docker context create remote --docker host=ssh://user@remote
docker remote context create user@remote
docker export context remote --docker host=ssh://user@remote
13.
What is the purpose of the 'docker manifest' command?
To display detailed information about Docker volumes
To interact with Docker image manifests
To manage Docker secrets
To configure Docker build settings
14.
What is the purpose of the '--platform' option when pulling a Docker image?
To configure the container's entry point
To specify the platform for the pulled image
To define the build context
To set the container isolation technology
15.
What is the purpose of the 'docker trust' command?
To manage content trust in Docker
To configure Docker networking
To list Docker contexts
To inspect Docker nodes
16.
How can you specify the isolation technology when running a Docker container?
docker run --isolation
docker set-isolation
docker create --isolation
docker isolate
17.
How can you expose a UDP port when running a Docker container?
docker run -p udp_port:container_port/udp
docker run -p udp_port:container_port --protocol=udp
docker run -u udp_port:container_port
docker run --udp-port udp_port:container_port
18.
What is the purpose of the 'docker manifest annotate' command?
To manage Docker volumes
To create a checkpoint of a running container
To add annotations to a Docker image manifest
To configure Docker network settings
19.
What is the purpose of the 'docker system prune --volumes' command?
To show detailed information about Docker volumes
To remove all unused Docker volumes
To configure Docker network settings
To create Docker stacks
20.
How can you configure the Docker daemon to listen on a specific IP address and port?
docker configure daemon --ip-address --port
Edit the /etc/docker/daemon.json file
docker daemon --ip-address --port
docker set daemon --ip-address --port