No description
  • Python 99.1%
  • Dockerfile 0.9%
Find a file
Matt Clay 81308e2560
Updates and 0.6.0 Release (#14)
* Update CI to use Python 3.13.
* Update RHEL 9.4 tests to 9.5.
* Add RHEL 10.0 tests.
* Remove Ubuntu 22.04 tests.
* Update ``pyproject.toml`` to use PEP 639 license metadata.
* Pin ``ansible-core`` dependency to version 2.19.2.
* Use ``flit_core==3.12.0`` for build.
* Switch Ubuntu builds from Docker to Podman.
* Change default remote image to ``ubuntu/24.04``.
* Update test requirements.
* Update integration tests to use Podman locally.
* Release 0.6.0.
2025-09-10 14:05:28 -07:00
.azure-pipelines Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
src Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
test Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
.gitignore Initial commit. 2022-05-13 15:41:02 -07:00
.rstcheck.cfg Update to ansible-core 2.18 and release 0.5.0 (#12) 2025-01-10 14:15:58 -08:00
.yamllint.yml Initial commit. 2022-05-13 15:41:02 -07:00
CHANGELOG.rst Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
LICENSE Initial commit. 2022-05-13 15:41:02 -07:00
noxfile.py Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
pyproject.toml Updates and 0.6.0 Release (#14) 2025-09-10 14:05:28 -07:00
README.rst Initial commit. 2022-05-13 15:41:02 -07:00

containmint
===========

Create multi-arch containers using native cloud builds.

Q&A
===

Why another tool?
-----------------

Most existing tools and services rely on QEMU to perform container builds on other architectures.
These builds are much slower, often running 15x longer than native builds.

Additionally, using customizable virtual machines allows for builds which dedicated build services may not support.

How does it work?
-----------------

Ephemeral virtual machines are provisioned through the Ansible Core CI service [#ansible_core_ci]_.
These virtual machines are used to perform native container builds.
The resulting images are pushed to a container registry.

After the container images are pushed, a manifest list referencing the container images is created.
The manifest list is then pushed to a container registry.

.. rubric:: Footnotes

.. [#ansible_core_ci] Authentication is required.
   An API key must be provided, or the tool must be run from an approved organization at a supported CI provider.

Usage Examples
==============

Configure container registry credentials
----------------------------------------

The credentials [#no_login]_ for the container registry [#one_registry]_ are set using environment variables:

.. code-block::

   export CONTAINMINT_USERNAME = 'my-username'
   export CONTAINMINT_PASSWORD = 'my-password'

.. rubric:: Footnotes

.. [#no_login] Use the ``--no-login`` option to allow operation without credentials.
   This option is only usable when not pushing to a container registry.

.. [#one_registry] Only one container registry can be used with each invocation.
   Multiple repositories from the same registry can be used.

Build and push a multi-arch container
-------------------------------------

The following steps can be performed in parallel:

.. code-block::

   containmint build --push --tag quay.io/my_org/scratch_repo:my_tag-x86_64 --arch x86_64
   containmint build --push --tag quay.io/my_org/scratch_repo:my_tag-aarch64 --arch aarch64

Once the steps above have been completed:

.. code-block::

   containmint merge --push \
     --tag quay.io/my_org/final_repo:my_tag \
           quay.io/my_org/scratch_repo:my_tag-x86_64 \
           quay.io/my_org/scratch_repo:my_tag-aarch64

This results in three tags:

* ``quay.io/my_org/final_repo:my_tag`` -- This manifest list contains x86_64 and aarch64 images.
* ``quay.io/my_org/scratch_repo:my_tag-x86_64`` -- This image is x86_64 only.
* ``quay.io/my_org/scratch_repo:my_tag-aarch64`` -- This image is aarch64 only.