Public-works developers containerize a Flask helper that queries Intersight inventory for a city NOC. Which practice correctly utilizes Docker for that process?
Select an answer to reveal the explanation.
Short Explanation
Docker is useful when the app actually lives in the container and listens where the image says—like a kiosk that only works when plugged into its labeled outlet. A host systemd service with Docker nearby is theater, not utilization.
Full Explanation
Container utilization means the application process runs inside the container and listens on the port the image documents as exposed. Orchestrators, service meshes, and load balancers then route to that container port as designed, and health checks exercise the real civic workload rather than an empty sidecar. Keeping the app as a host systemd unit on port 80 while an idle Docker daemon sits nearby fails the intent: compliance theater does not place the process under the image’s lifecycle, resource limits, or restart policy. Binding only on a hypervisor management IP and omitting any documented container port breaks discoverability for platforms that expect EXPOSE/containerPort contracts and leaves operators guessing where probes should land. Starting Python on the host and using Docker only to copy source into /opt at boot likewise keeps the runtime outside the container, so image rebuilds do not carry the process and rollouts stay host-centric. Exam caveat: publishing a containerPort without a listening process still fails readiness—documentation must match the actual bind address and port inside the namespace. Operational check: exec or attach to the running municipal service container, confirm the app PID is PID 1 (or the declared entrypoint child), and verify it accepts connections on the documented container port from the cluster network.