🔥 0
0
Lesson 10 of 10 12 min +225 XP

🧠 Quiz: Docker Fundamentals

Answer all questions to complete the quiz and earn 225 XP.

1

What is the main benefit of using containers?

2

What does 'docker build -t shopflow/api:1.0 .' do?

3

Why is this Dockerfile inefficient for rebuilds?\n\nFROM node:20\nCOPY . .\nRUN npm install\nCMD [\

4

How do containers in a Docker Compose network communicate?

5

What happens to data in a container when it's removed (without volumes)?

6

What's wrong with this approach?\n\nDockerfile:\nENV STRIPE_KEY=sk_live_abc123

7

What does '-p 8080:3000' do in docker run?

8

Which command shows logs from the 'api' service in Docker Compose?

9

Why use alpine-based images in production?

10

What does 'depends_on' do in docker-compose.yml?

11

How would you persist a PostgreSQL database across container restarts?

12

What command rebuilds and restarts all services in Docker Compose?