Building image¶
Cekit supports following builder engines:
Docker
– build the container image using docker build command and it default optionOSBS
– build the container image using OSBS serviceBuildah
– build the container image using Buildah
Executing builds¶
You can execute an container image build by running:
$ cekit build
Options affecting builder:
--tag
– an image tag used to build image (can be specified multiple times)--redhat
– build image using Red Hat defaults. See Configuration section for Red Hat specific options for additional details.–add-help` – add generated help.md file to the image
–no-add-help` – don’t add generated help.md file to the image
--work-dir
– sets Cekit works directory where dist_git repositories are cloned into See Configuration section for work_dir--build-engine
– a builder engine to useosbs
,buildah
ordocker
[1]--build-pull
– ask a builder engine to check and fetch latest base image--build-osbs-stage
– userhpkg-stage
tool instead ofrhpkg
--build-osbs-release
[2] – perform a OSBS release build--build-osbs-user
– alternative user passed to rhpkg –user--build-osbs-target
– overrides the defaultrhpkg
target--build-osbs-nowait
– run rhpkg container-build with –nowait option specified--build-tech-preview
[2] – updates image descriptorname
key to contain-tech-preview
suffix in family part of the image nameExample: If your
name
in image descriptor is:jboss-eap-7/eap7
, generated name will be:jboss-eap-7-tech-preview/eap7
.
[1] | docker build engine is default |
[2] | (1, 2) option is valid on for osbs build engine |
Docker build¶
This is the default way to build an container image. The image is build using docker build
.
Example: Building a docker image
$ cekit build
OSBS build¶
This build engine is using rhpkg container-build
to build the image using OSBS service. By default
it performs scratch build. If you need a release build you need to specify --build-osbs-release
parameter.
Example: Performing scratch build
$ cekit build --build-engine=osbs
Example: Performing release build
$ cekit build --build-engine=osbs --build-osbs-release
Buildah build¶
This build engine is based on Buildah. Buildah still doesn’t support non-privileged builds so you need to have sudo configured to run buildah as a root user on your desktop.
Note
If you need to use any non default registry, please update /etc/containers/registry.conf file.
Example: Building image using Buildah
$ cekit build --build-engine=buildah