A tool which builds container images using Ansible playbooks
Project description
ansible-bender
This is a tool which bends containers using Ansible playbooks and turns them into container images. It has a pluggable builder selection — it is up to you to pick the tool which will be used to construct your container image. Right now the only supported builder is buildah. More to come in the future. Ansible-bender (ab) relies on Ansible connection plugins for performing builds.
tl;dr Ansible is the frontend, buildah is the backend.
The concept is described in following blog posts:
You may be asking: why not ansible-container? Ansible bender is actually heavily inspired by ansible-container: the main distinction is that ansible-container covers the complete lifecycle of a containerized application while ab takes care of image builds only.
Status: ready to be used
Ansible-bender was recently moved to the ansible-community organization. \o/
Features
- You can build your container images with buildah as a backend.
- Ansible playbook is your build recipe.
- You are able to set various image metadata via CLI or as specific Ansible vars:
- working directory
- environment variables
- labels
- user
- default command
- exposed ports
- You can do volume mounts during build.
- Caching mechanism:
- Every task result is cached as a container image layer.
- You can turn this off with
--no-cache
. - You can disable caching from a certain point by adding a tag
no-cache
to a task.
- You can stop creating new image layers by adding tag
stop-layering
to a task. - If an image build fails, it's committed and named with a suffix
-[TIMESTAMP]-failed
(so you can take a look inside and resolve the issue). - The tool tries to find python interpreter inside the base image.
- You can push images you built to remote locations such as:
- a registry, a tarball, docker daemon, ...
- podman push is used to perform the push.
Documentation
You can read more about this project in the documentation:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file ansible-bender-0.9.0.tar.gz
.
File metadata
- Download URL: ansible-bender-0.9.0.tar.gz
- Upload date:
- Size: 6.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2566d1f38780feb70d0473a7df15e92223e86446b70246f5da1f5b3a3f596411 |
|
MD5 | aae63f34e033f9dc87dbb86d890d667b |
|
BLAKE2b-256 | bcad2d71238031987b8ef670947a5d8635cd82c64a66b7b45e728864cfd3aa7f |
File details
Details for the file ansible_bender-0.9.0-py2.py3-none-any.whl
.
File metadata
- Download URL: ansible_bender-0.9.0-py2.py3-none-any.whl
- Upload date:
- Size: 37.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.1.3 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97d65008c9bc1d317773702cd1b880d73a40172d0142d6aeab5760c7e7c9bf7c |
|
MD5 | fc69c1e6b701e0051a4140a8e0f37e68 |
|
BLAKE2b-256 | ec75f3851b0997c2661868bc0bca407e215d4d3dcf5dd831963dee1e250ed51e |