Skills101
← All practice quizzes

Quiz: Docker and Containers

5 questionsNo time limitPass: 60%+10 XP on first pass

Why containers ended "it works on my machine", the difference between images and containers, writing a good Dockerfile for a Node.js or Python app, layer caching, ports, volumes, environment variables and running an app plus database with Docker Compose.

Log in to take the quiz

Free account · see your score, answers and explanations, earn XP

  1. Question 1

    What is the relationship between a Docker image and a container?

  2. Question 2

    What does docker run -p 8080:80 nginx do?

  3. Question 3

    Why copy package.json and run npm ci before copying the rest of the code?

  4. Question 4

    In the Compose file, how does the web service reach the database?

  5. Question 5

    Where should database data live so it survives removing the container?