Which of the following best explains why containers improve software deployment?
Think about how containers handle the environment and dependencies.
Containers bundle the app and all its dependencies, so it runs consistently on any system with container support.
What is the output of this Docker command?
docker run --rm alpine echo Hello, Containers!
Consider what the echo command does inside the container.
The command runs the alpine container, executes echo Hello, Containers!, and prints the exact string.
Put these steps in the correct order to build and run a Docker container from a Dockerfile.
Think about writing the instructions first, then building, then running.
You first write the Dockerfile, then build an image from it, then run a container from that image, and finally test the container.
You run docker run myapp but the container stops immediately. What is the most likely reason?
Think about what keeps a container running after it starts.
Containers stop when their main process ends. If the app exits immediately, the container stops too.
Which base image choice is best for a small, secure container for a simple web app?
Consider image size and security risks from extra software.
Alpine is a minimal Linux image, small and with fewer packages, reducing vulnerabilities and size.