Which statement best describes the difference in resource usage between containers and virtual machines?
Think about what runs inside containers versus virtual machines.
Containers share the host OS kernel, so they are lightweight and use fewer resources. Virtual machines run a full guest OS, which requires more resources.
What is the output of the command docker ps when no containers are running?
docker ps
Try running docker ps on a system with no running containers.
The docker ps command always shows the header line even if no containers are running. It does not print an error or message.
Which sequence correctly describes the steps to migrate an application from a virtual machine to a Docker container?
Think about the logical order from understanding the app to deployment.
First, identify dependencies, then write the Dockerfile, build the image, and finally test and deploy.
You have a container running a web server, but you cannot access it from your host machine. Which is the most likely cause?
Check how ports are exposed from container to host.
If the container port is not published to the host, the host cannot access the service inside the container.
Which practice is best to minimize the size of a Docker container image?
Think about what makes images large and how to reduce that.
Using a minimal base image and cleaning up unnecessary files reduces image size and improves performance.