An administrator needs to copy a configuration file named /tmp/nginx.conf from the host into a running container named web_server at path /etc/nginx/nginx.conf. Which command should be used?
podman cp supports copying from host to container using host_path:container_path syntax.
Why this answer
The podman cp command copies files between the local filesystem and a container's filesystem (or between containers), using the syntax podman cp SRC DEST where a container path is prefixed with the container name and a colon. This mirrors docker cp and is the standard tool for injecting files into a running container. The command podman cp /tmp/nginx.conf web_server:/etc/nginx/nginx.conf correctly places the host file at the target path inside the container.
Exam trap
EX188 often tests confusion between image-level operations (push, import, build) and container-level file operations (cp), so candidates must recognize that only podman cp moves files into a running container.
How to eliminate wrong answers
Option A is wrong because podman push uploads an image to a registry — it has no --target flag and does not copy individual files into containers. Option C is wrong because podman transfer is not a valid Podman subcommand. Option D is wrong because podman import creates an image from a tarball of a filesystem, not a single file, and does not accept a container name as a destination.