Which Podman option binds a host directory to a container path during run?

Prepare for the Red Hat OpenShift Developer II DO288 Exam with our quizzes. Study with flashcards and multiple choice questions, each with hints and explanations. Get ready for your certification!

Multiple Choice

Which Podman option binds a host directory to a container path during run?

Explanation:
Binding a host directory into a container happens with the volume option, using -v (or --volume). It takes the form hostPath:containerPath, for example: podman run -v /host/data:/data image. This mounts the directory from the host into the container, so files are accessible and can be shared between them (optionally read-only with :ro). The other options don’t mount directories: -p maps host ports to container ports, --name assigns a container name, and --network connects the container to a network.

Binding a host directory into a container happens with the volume option, using -v (or --volume). It takes the form hostPath:containerPath, for example: podman run -v /host/data:/data image. This mounts the directory from the host into the container, so files are accessible and can be shared between them (optionally read-only with :ro). The other options don’t mount directories: -p maps host ports to container ports, --name assigns a container name, and --network connects the container to a network.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy