安装
需求
要构建镜像,您必须安装一个容器化工具 -
podman
或docker
- 以及ansible-builder
Python 包。--container-runtime
选项必须与您使用的容器化工具相对应。ansible-builder
版本3.x
需要 Python3.9
或更高版本。
从 PyPI 安装
$ pip3 install ansible-builder
注意
安装 ansible-builder
的一种**替代**方法是使用 ansible-dev-tools
包。 Ansible 开发工具 (ADT) 是一个包含所有必要工具的 Python 包,用于设置开发环境、生成新的集合、构建和测试内容。
# This also installs ansible-core if it is not already installed
$ pip3 install ansible-dev-tools
从源代码安装
要从主线开发分支安装
$ pip3 install https://github.com/ansible/ansible-builder/archive/devel.zip
要从特定标签或分支安装,请在以下示例中替换 <ref>
$ pip3 install https://github.com/ansible/ansible-builder/archive/<ref>.zip