Skip to content

Simple toolbox for building system containers

License

Unknown, GPL-3.0 licenses found

Licenses found

Unknown
LICENSE
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

projectatomic/system-buildah

Repository files navigation

system-buildah

Simple toolbox for building system images. Read more on the Project Atomic Blog.

Build Status

Requires

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)

Install

For Your User

  1. Clone the repo
  2. python setup.py install --user

Install via RPM

  1. Download the source
  2. Extract the source to the local directory
  3. Move the tarball to your rpmbuild/SOURCES/ directory
  4. rpmbuild -ba contrib/rpm/system-buildah.spec
  5. rpm -ivh $PATH_OF_THE_BUILT_RPM

Example

# 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

Moby/Docker

# 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

Buildah (Experimental)

# 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