Unable to use directory volume mounts using podman #51
Replies: 1 comment
-
Hey @nathan-isaac, Thanks a lot for using these images! I think you are running into the scenario where the host volume does not preserve the files already present in the container's directory while the named volume first copies the files inside the container's directory into the volume and then mounts the volume back into the container. Specifically, here is what I mean: As you have already seen yourself, the directory
When you now mount a host volume, that directory simply vanishes:
Without the database files inside the container, the Oracle instance cannot mount and open the database. While if you use a named volume, these files will first be copied into the named volume (you will notice a longer start time of the container because the container copies these files):
It's probably worth noting that if you were to use the non-faststart image, this mechanism would work, as the database files will be extracted into the
Hope this helps! |
Beta Was this translation helpful? Give feedback.
-
Has anyone been able to get directory volume mounts working with podman? I'm using fedora and I'm unable to get it to work. It does work if I create a podman volume before with
podman volume create db-oradata
but not when I use a directory volume mount.$ podman run -it --rm -v ./oradata:/opt/oracle/oradata:Z -e ORACLE_PASSWORD=password --userns="keep-id:uid=54321,gid=54321" gvenzl/oracle-free:slim-faststart
Command output
Oradata files
Beta Was this translation helpful? Give feedback.
All reactions