Simple toolbox for building system images. Read more on the Project Atomic Blog.
NOTE: This code base is written to be compatible with Python 3 and thus will not work on older versions of Python!
The list of requirements are limited to keep portability between OS variations as simple as possible.
- python3
- docker binary and service
- ocitools binary
- jinja2 (python library)
- buildah (optional for experimental manager)
- Clone the repo
python setup.py install --user
- Download the source
- Extract the source to the local directory
- Move the tarball to your
rpmbuild/SOURCES/
directory rpmbuild -ba contrib/rpm/system-buildah.spec
rpm -ivh $PATH_OF_THE_BUILT_RPM
# Generate system image files
$ system-buildah generate-files \
--default=variable=value -D=another=anothervalue \
--config="--hostname=confighost --cwd=/root" \
new_container_image
# Generate a system image Dockerfile
$ system-buildah generate-dockerfile \
--from-base fedora:latest \
--output new_container_image name_of_image
# Build a system container image
$ system-buildah build \
--path new_container_image my_system_container_image
[...]
# Export the image as a tar
$ system-buildah tar my_system_container_image
# Build a system container image
$ system-buildah build --manager buildah \
--path new_container_image my_system_container_image
[...]
# Export the image as a tar
$ system-buildah tar --manager buildah my_system_container_image