Challenge - 5 Problems
Compose Watch Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
What is the output of this Docker Compose watch command?
You run this command to watch file changes and restart the service automatically:
What will you see in the terminal when a source code file changes?
docker compose watch
What will you see in the terminal when a source code file changes?
Attempts:
2 left
💡 Hint
`docker compose watch` detects changes in the build context.
✗ Incorrect
`docker compose watch` monitors the build context for changes, rebuilds the image if needed, recreates and restarts the container, showing build logs and container logs.
❓ Configuration
intermediate1:30remaining
Which docker-compose.yml snippet enables live code reload with volume mounting?
You want your container to reflect code changes immediately during development. Which volume configuration achieves this?
Attempts:
2 left
💡 Hint
Mount your local folder into the container path.
✗ Incorrect
Mounting ./app on the host to /app in the container syncs code changes immediately.
🔀 Workflow
advanced2:00remaining
What is the correct sequence to enable live reload with Docker Compose and nodemon?
You want to develop a Node.js app with live reload inside a container using nodemon. Which sequence of steps is correct?
Attempts:
2 left
💡 Hint
Think about installing tools before configuring and running.
✗ Incorrect
First install nodemon, then mount code, set command to nodemon, then start container.
❓ Troubleshoot
advanced1:30remaining
Why does your container not reflect code changes despite volume mounting?
You mounted your local code folder into the container, but changes are not visible inside the container. What is the most likely cause?
Attempts:
2 left
💡 Hint
Verify the host-side path first.
✗ Incorrect
If the host path (e.g., ./app) is incorrect, doesn't exist, or is empty, the container won't see the expected files despite the volume mount.
✅ Best Practice
expert2:30remaining
Which approach best supports fast iterative development with Docker Compose?
You want to develop a Python web app with fast code reload and minimal container rebuilds. Which setup is best?
Attempts:
2 left
💡 Hint
Minimize rebuilds and use live reload tools.
✗ Incorrect
Mounting source code and using a watcher inside container avoids rebuilds and speeds development.