Docker Objective Questions and Answers - Set 2

This Docker quiz contains carefully curated objective questions with correct answers and clear explanations. It is designed for developers, DevOps engineers, and interview preparation, covering containerization fundamentals and best practices. This is part 2 of the series.

Practice Docker MCQs with Detailed Explanations

Answer at least 12 questions to submit and verify answers.

16 Which command removes a Docker image? Easy

17 Which storage mechanism persists data beyond container lifecycle? Medium

18 Which network type allows containers to communicate on the same host? Medium

19 Which command shows Docker images on the system? Easy

20 What does the -d flag do in docker run? Easy

21 Which command maps a container port to a host port? Easy

22 Which command displays container logs? Easy

23 Which Docker object defines environment variables at runtime? Medium

24 Which command executes a command inside a running container? Medium

25 Which Docker feature reduces image size by using multiple build stages? Medium

26 Which file is used to ignore files during image build? Easy

27 Which command removes stopped containers? Medium

28 Which isolation technology does Docker primarily rely on? Hard

29 Which command starts an existing stopped container? Easy

30 Which Docker command shows detailed container configuration? Medium