Container image builder for Maru OS.
Image building logic is separated into standalone plugins called blueprints.
To create your own blueprint, all you need to do is:
-
Add a directory under blueprint/. Use this directory to store anything you need during the build process.
-
Add a script called plugin.sh to the top-level of your new blueprint directory. This will be the entrypoint to your blueprint.
-
Define the function
blueprint_build
in plugin.sh that will run your build logic. -
Define the function
blueprint_cleanup
in plugin.sh that will clean up any intermediate build artifacts.
apt install qemu-user-binfmt qemu-user-static debootstrap curl cgmanager
update-binfmts --importdir /var/lib/binfmts/ --import
update-binfmts --install qemu-arm
update-binfmts --enable
Build a Kali armhf container called 'kali' (option defaults):
# ./build.sh -b kali -n kali-rolling -- -a armhf
Build a Kali arm64 container called 'kali-rolling64':
# ./build.sh -b kali -n kali-rolling -- -a arm64
Docker build:
# docker build -t lxcbuilder .
# docker run -ti --privileged=true lxcbuilder
Tip: You will need root privileges to mount binfmt_misc for bootstrapping foreign architecture containers.
See the main Maru OS repository for more info.
This repository is licensed under the Apache License, Version 2.0. See LICENSE for the details.