Podman container storage

Background:

I’m trying to understand how storage is implemented for the Podman container system, but am not getting much satisfaction from the sparse Container documentation.

Specifically, what type of storage implementation is the

set container <name> volume <volumename> [source | destination ] <path>

section in the VyOS docs using? I’m assuming it’s something like a bind mount, as described in the Docker docs: Use Bind Mounts.

Desired Behavior:

However, for my application, I’d like to use an actual dedicated/standalone volume storage method, as described in the Docker docs: Use Volumes. With this method, I could create one dedicated (persistent) Volume and reference it in multiple Podman containers.

Going by this this earthly.dev blog post, Docker supports the referencing of a Volume by name (rather than filepath):

docker run --mount source=[volume_name],destination=[path_in_container] [docker_image]

Of course, I could use the equivalent Podman command, however, that would be outside of the VyOS CLI system. As far as I can tell, the VyOS CLI container only accommodates the bind mount method, as a filepath is required. (Attempts to reference a Volume [created independently using the Podman CLI] by Name fail with error: source path <volume-name> does not exist!)

Can someone please advise how I can reference an independent/standalone Podman Volume in the VyOS CLI?

PS.

It’d be great if there was a containers tag or podman tag or suchlike in the Forum, as research on this subject must be sorted out from the Docker Build Container chatter here and elsewhere on the internet.

I think it is cover on this task:

https://phabricator.vyos.net/T4249

if understand correctly, you should be able to configure any device/location with this :
#documentation :
set container <name> volume <volumename> [source | destination ] <path>

we use podman on VyOS, so this function should be compatible with this container technology.

Try to build a container from docker-file
In this file you can describe all volumes

vyos@r14:~$ generate container image foo 
Possible completions:
  path          Path to Dockerfile
1 Like

Hi @Viacheslav , command “generate container image” is it still valid in vyos version 1.3, and 1.4? for podman?

my bad, reading further and with a bit of guess found that the feature is present on the latest, I was checking the same on an older version of 1.4, and 1.3 in both I didn’t find the above command, I stumbled upon this thread while I was searching for an answer as to why the latest V1.4 nightly build constantly throws an error
“WARN[0000] Switching default driver from overlay2 to the equivalent overlay driver”

which by the way I am yet to understand and find a solution,

thanks