Packages

To install additional RPM packages you can use the packages section where you specify package names and repositories to be used.

packages:
    install:
        - mongodb24-mongo-java-driver
        - postgresql-jdbc
        - mysql-connector-java
        - maven
        - hostname

Packages are defined in the install subsection.

Repositories

Cekit uses all repositories configured inside the image. You can also specify additional repositories using repositories subsection. Cekit currently supports following multiple ways of defining additional repositories:

  • Plain
  • RPM
  • ODCS
  • URL

Note

See Repository mangement to learn about best practices for repository definitions.

Plain

This is the default option. With this approach you specify repository id and Cekit will not perform any action and expect the repository definition exists inside the image. This is useful as a hint which repository must be present for particular image to be buildable. The definition can be overridden by your preferred way of injecting repositories inside the image.

packages:
    repositories:
        - name: extras
          id: rhel7-extras-rpm
          description: "Repository containing extras RHEL7 extras packages"

Note

Behavior of plain repositories is changed when running in Red Hat Environment.

RPM

This ways is using repository configuration files and related keys packaged as an RPM.

Example: To enable CentOS SCL inside the image you should define repository in a following way:

packages:
    repositories:
        - name: scl
          rpm: centos-release-scl

ODCS

This way is instructs ODCS to generate on demand pulp repositories. To use ODCS define repository section in following way:

packages:
    repositories:
        - name: Extras
          odcs:
              repository: rhel-7-extras-rpm

Note

Only on demand pulp ODCS repositories are supported now.

URL

This approach enables you to download a yum repository file and corresponding GPG key. To do it, define repositories section in a way of:

packages:
    repositories:
        - name: foo
          url:
            repository: https://web.example/foo.repo
            gpg: https://web.exmaple/foo.gpg