Search code examples
persistent-volumespodman

How to use persistent-volume with podman pod and containers


I want to run two containers in podman pod. Both of these containers will use same persistent volume. Do I use --volume when I run each container OR when I run pod.


Solution

  • It depends, do you want the volume mounted to the same place for both containers? If so, you can mount it to the pod and both will have it, otherwise, you can mount it to each container separately without mounting it to the entire pod.