%OS_VERSION% in containerfile snippets?
Is there a way to use the release version in a containerfile snippet?
For example:
instead of a specific release, I want something like:
12 Replies
I'm not sure, but I think it might be available as an ENV var in the Containerfile, which means it'd be possible to just use it with regular Containerfile syntax
Check by building the recipe into a Containerfile locally
So this is actually set in the export script, which is sourced on every module call. We don't actually set it as an environment variable in the container file itself.
This is mainly because we're trying to get the information from the OS release file
I would instead suggest running a script snippet right after the container file module call that copy should carry over for the script call
Also keep in mind that the image size will be bloated because you're copying in the RPMs
For this particular issue, you might be able to just use the akmods module
can't currently cover his usage (nvidia logic needs to be updated)
plus he copies ublue-os config & some more stuff from ublue
so it's in 1 place when looking into recipe/script
but I guess that when
nvidia
logic gets updated (hopefully no more breaking changes), he can switch to using akmods moduleoh right, i need to manually delete right?
That won't help when you're using the copy syntax. If you delete it in a later step, the image size won't really be reduced unless you're using squash
I can work on that later
ah i see
not exactly sure what you mean
If you use the script module, it will automatically set up the export so you can use OS version environment variable
ahh
Oh wait, you're trying to use that on the copy line
wait shouldnt the script module come before then?
I think I would have to add functionality for substitution like that for the containerfile module
that would be convenient, no rush though i can work around it for now