Build system for Nua packages.
Nua is an open source, self-hosted cloud platform project (a PaaS - platform as a service).
nua-build package is used to build packages deployable by the Nua orchestrator.
The current version of nua-build builds Docker images for an amd64 Linux environment. There are plans to extend the system to other container and isolation architectures in future releases.
nua-build relies on a
nua-config configuration file containing application build directives. This configuration can reference other local or remote providers and is supplemented by default values. The file can be formatted as TOML, JSON or YAML.
The main steps to build a Nua image:
- Analysis of the
- detection of the required base images,
- build or pull base images if needed,
- collect files (Dockerfile, configuration files),
- build a Docker container using the
- store locally the resulting images as a
nua-build allows 2 approaches for image generation:
The package can use a generic Dockerfile provided by
nua-build, in which case most of the containerization work is done by a python script (build.py) executed in the container being built. This permits a build with a single
RUNcommand in the docker file, but requires to specify the build through the
nua-configconfig file and some python script.
The package can use a dedicated (potentially pre-existing) Dockerfile. Then this Dockerfile must be modified slightly to add the metadata to the image:
RUN mkdir -p /nua/metadata
COPY nua-config.toml /nua/metadata/
Standard Nua images are images build from
nua-build’s default Dockerfile.
Standard Nua images contain three layers:
- A Linux image (Ubuntu 22.04 LTS Jammy, amd64),
nua-python, addition of python 3.10,
nua-builder, addition of
All standard Nua packages have a Python environment.
Some other base images are available to facilitate builds in other programming environments:
Dependencies on other Nua Python packages¶
nua-build uses the following packages:
nua-lib: common code for all Nua packages. It provides:
shell: shell shortcuts (mostly wrappers above
exec: shortcuts to execute sub commands like
actions: higher level commands, related to the installation of packages and dependencies (wrappers above
nua-agent: agent for building Nua apps. It provides:
app_builder: actual builder of the application inside the Docker image.