I’m wondering how persistence works if I change the system image. I’m specifically wondering for the sake of podman images, is it safe to keep these on the standard system root, or would these changes be wiped if I did a system upgrade.
Images saved to persistent directory.
So update VyOS image will (should be) safe
I mean if I attach a volume for example, and I have the contents of that linked to /etc/ on vyos, in directories that were not present prior. I’m using bind9 specifically. I also created my own image instead of importing one. Here is the simple container I created:
FROM alpine:3.16.2
RUN apk update
RUN apk add --no-cache bind
USER named
EXPOSE 53/udp
CMD ["named", "-c", "/etc/bind/named.conf", "-g"]
You can generate your images from a file
vyos@r1:~$ generate container image foo
Possible completions:
path Path to Dockerfile
If you want persist config mounts place files to the /config
directory
set container name foo volume myconf source /config/container/foo.conf
set container name foo volume myconf destination /etc/bind/named.conf
Thanks for that information, I think I generated the manually using podman, and just set vyos to use that container hash. I just tried that and it seems I was able to specify the image without a hash which is nice, and I’m sure this method will be more persistent. I don’t think there was any mentions of how persistence works in the wiki, I may have missed it.