Explanation: The 'docker exec' command is used to execute a command inside a running Docker container.
Dear candidates you will find MCQ questions of Docker here. Learn these questions and prepare yourself for coming examinations and interviews. You can check the right answer of any question by clicking on any option or by clicking view answer button.
Share your questions by clicking Add Question
Explanation: The 'docker exec' command is used to execute a command inside a running Docker container.
Explanation: 'docker stop' sends a SIGTERM signal to gracefully stop a container, while 'docker kill' sends a SIGKILL signal to forcefully stop it.
Explanation: The '-d' flag is used with 'docker run' to run the container in detached mode.
Explanation: The default network driver used by Docker is 'bridge', which creates a private internal network.
Explanation: The 'docker run' command is used to create and start a container from an image.
Explanation: The 'docker rmi' command is used to remove a Docker image from the local machine.
Explanation: The 'docker build' command is used to build a Docker image from a Dockerfile and a context (usually the current directory).
Explanation: The default network driver in Docker is 'bridge', which creates a private internal network for containers to communicate.
Explanation: The 'docker ps' command lists all running containers. To list all containers (including stopped ones), use 'docker ps -a'.
Explanation: A Dockerfile is a text document that contains instructions to build a Docker image, defining the runtime environment for a container.