[SOLVED] Podman quadlet adding files to container
from Nico_198X@europe.pub to selfhosted@lemmy.world on 09 Jul 17:48
https://europe.pub/post/2341978

i just ended up going with a new image with the components installed, which i’ve been informed is best practice.


Hey there!

i have an Owncast container that needs two extra files added to it every time it starts up because the base image doesn’t include them. they can be downloaded from within the container. i just need a way to tell the container to always do that when it starts up.

i’ve tried adding this to my quadlet:

[Container]

Exec=apk update && apk add --no-cache mesa-va-gallium mesa-dri-gallium

but it doesn’t work.

does anyone know how to correctly automate this?

thanks!

#selfhosted

threaded - newest

InnerScientist@lemmy.world on 09 Jul 18:05 next collapse

I think you can use volumes or mounts to add signal files.

Nico_198X@europe.pub on 09 Jul 18:14 collapse

well, we can download these libraries from within the container. i just want a way to tell the container to always do that on startup

InnerScientist@lemmy.world on 09 Jul 19:28 collapse

Well, ithe correct way would be to create a new container image using your current image as the base and executing your commands, you then need to rebuild that image when the base image is updated.

Nico_198X@europe.pub on 10 Jul 06:36 collapse

ooo i see. ok i did not consider that

giacomo@lemmy.dbzer0.com on 10 Jul 01:11 collapse

do the logs show any errors with the exec?

What about putting it in a simple shell script with a volume mount?
Or maybe something like this would work? Exec=sh -c “apk update && apk add --no-cache mesa-va-gallium mesa-dri-gallium”

Sorry, I’m pretty new to quadlets myself, but I’ve gotten stuff working thanks to the podman documentation.

Nico_198X@europe.pub on 11 Jul 10:37 collapse

thanks, i just ended up going with a new image with the components installed.