How to use BlueBuild modules from a Containerfile
The BlueBuild CLI is used to build a recipe into a Containerfile, and then building that Containerfile into an OCI image, which can be switched to and booted on an atomic Fedora system. If you’re using recipes, you probably don’t need this guide.
-
To follow this tutorial, you need to have a setup with a Containerfile that is used to build a custom image of atomic Fedora.
- If you don’t already have such as setup and don’t know where to get started the
ublue-os/image-template
is a good minimal place to start.
- If you don’t already have such as setup and don’t know where to get started the
-
Make the following changes to your Containerfile
-
(optional) Add this below each of the
FROM
lines that define images you wish to use BlueBuild modules with YAML configuration in
-
-
Add a
RUN
statement for the module you wish to use-
The
run_module.sh
script takes in two arguments; the module’s name and it’s configuration as a JSON string. -
If you wish to provide the module configuration as YAML instead of JSON, you can use the following code snippet at the bottom of the
RUN
statement shown above instead. (make sure to add\n\
to the end of each line, and that you haveyq
installed) -
If you wish to use a module that expects you to include some files, you can copy those to
/tmp/files/
as that is to the directory where the./files/
directory is accessible in a standard BlueBuild build.
-