script Module for Startingpoint¶
script module can be used to run arbitrary scripts at image build time that take no or minimal external configuration (in the form of command line arguments).
The scripts, which are run from the
config/scripts directory, are declared under
type: script scripts: - signing.sh
Creating a Script¶
example.sh for an example shell script. You can rename and copy the file for your own purposes. In order for the script to be executed, declare it in the recipe
When creating a script, please make sure
- ...its filename ends with
- This follows convention for (especially bash) shell scripts.
autorun.shonly executes files that match
- ...it starts with a shebang like
- This ensures the script is ran with the correct interpreter / shell.
- ...it contains the command
set -oue pipefailnear the start.
- This will make the image build fail if your script fails. If you do not care if your script works or not, you can omit this line.