Python library with command line interface for building docker images.


License
BSD-3-Clause
Install
pip install atomic-reactor==1.3.7

Documentation

Atomic Reactor

unittests status badge coveralls status badge lgtm python badge lgtm alerts badge linters status badge

Python library with command line interface for building docker images.

Features

  • Push image to registry when it's built
  • Build inside a docker container (so your builds are separated between each other)
  • git as a source to your Dockerfile (you may specify commit/branch and path to Dockerfile within the git repo)
  • Collect build logs
  • Integration with koji build system
  • Integration with fedora packaging system
  • Inject arbitrary yum repo inside Dockerfile (change source of your packages)
  • Retag base image so it matches FROM instruction in Dockerfile
  • Change base image (FROM) in your Dockerfile
  • Run simple tests after your image is built

Installation

From git

Clone this git repo and install Atomic Reactor using python installer:

git clone https://github.com/containerbuildsystem/atomic-reactor.git
cd atomic-reactor
pip install . --user

You don't even need to install it. You may use it straight from git:

export PYTHONPATH="${REACTOR_PATH}:${PYTHONPATH}"
alias atomic-reactor="python ${REACTOR_PATH}/atomic-reactor/cli/main.py"

Adding Dependencies

To add more Python dependencies, add them to the following files:

If you're wondering why you need to add dependencies to both files (setup.py and one of the requirements files), see install_requires vs requirements files.

To be able to build atomic-reactor with Cachito, we also need to keep the build requirements updated. Please follow Cachito pip build dependencies for updating build requirements. Please note that the resulting requirements will need to be pinned to older versions before moving to the next step to avoid installation issues with newer dependency versions.

Afterwards, pip-compile the dependencies via make pip-compile (you may need to run make venv first, unless the venv already exists).

Additionally, if any of the newly added dependencies in the generated requirements*.txt files need to be compiled from C code, please install any missing C libraries in the Dockerfile(s) as well as the test.sh script

Usage

If you would like to build your images within build containers, you need to obtain images for those containers. We call them build images. Atomic Reactor is installed inside and used to take care of build itself.

You can either get the build image from Dockerhub or create it yourself.

Further reading