Challenge - 5 Problems
Containerization Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why use containerization with Spring Boot?
Which of the following best explains why containerization is important when deploying Spring Boot applications?
Attempts:
2 left
💡 Hint
Think about how containerization helps with consistency across different environments.
✗ Incorrect
Containerization bundles the Spring Boot app with everything it needs, so it behaves the same on any system.
❓ component_behavior
intermediate2:00remaining
Spring Boot app behavior inside a container
What happens when you run a Spring Boot application inside a Docker container on a different machine?
Attempts:
2 left
💡 Hint
Consider what a container includes when it runs an app.
✗ Incorrect
Containers include the app and all needed parts, so the app runs the same on any machine with Docker.
📝 Syntax
advanced2:30remaining
Dockerfile for Spring Boot app
Which Dockerfile snippet correctly builds a container image for a Spring Boot application packaged as a jar?
Attempts:
2 left
💡 Hint
Look for the correct base image and command to run a jar file.
✗ Incorrect
Option C uses the correct Java base image and runs the jar with the right ENTRYPOINT syntax.
🔧 Debug
advanced2:30remaining
Fixing container startup failure
A Spring Boot app container fails to start with error 'Could not find or load main class'. Which Dockerfile mistake causes this?
Attempts:
2 left
💡 Hint
Check if the path in ENTRYPOINT matches the copied file location.
✗ Incorrect
Option A copies the jar to /app.jar but tries to run 'app.jar' without the leading slash, causing the error.
❓ state_output
expert3:00remaining
Container resource limits effect on Spring Boot app
If you limit CPU and memory for a Spring Boot container, what is the most likely effect on the app's behavior?
Attempts:
2 left
💡 Hint
Think about what resource limits do to processes inside containers.
✗ Incorrect
Resource limits restrict CPU and memory usage, so the app may slow or crash if it needs more, but it won't affect other system apps.