81.2. tripleo 容器镜像构建
使用 tripleo-ansible 构建 tripleo 容器镜像。
使用方法:
openstack tripleo container image build [-h] [--authfile <authfile>] [--base <base-image>] [--config-file <config-file>] [--config-path <config-path>] [--distro <distro>] [--exclude <container-name>] [--extra-config <extra-config>] [--namespace <registry-namespace>] [--registry <registry-url>] [--skip-build] [--tag <image-tag>] [--prefix <image-prefix>] [--push] [--volume <volume-path>] [--work-dir <work-directory>] [--rhel-modules <rhel-modules>]
值 | 概述 |
---|---|
-h, --help | 显示帮助信息并退出 |
--authfile <authfile> | 身份验证文件的路径。使用 REGISTRY_AUTH_FILE 环境变量覆盖。(默认值: /root/containers/auth.json) |
--base <base-image> | 带有可选版本的基础镜像名称。可以是 centos:8,基本名称镜像将是 centos,但会拉取 centos:8 来构建基础镜像(默认: ubi8) |
--config-file <config-file> | YAML 配置文件指定要构建的镜像。(默认为 tripleo_containers.yaml) |
--config-path <config-path> | 基本配置路径。这是所有 container-image 文件的基本路径。如果设置了这个选项,则 <config-file> 的默认路径会被修改。(默认值: /usr/share/tripleo-common/container-images) |
--distro <distro> | Distro name,如果未定义,系统会使用主机 distro 进行构建(默认:centos) |
--exclude <container-name> | 要与要构建的容器列表匹配的一个容器名称。在跳过多个容器时,应多次指定。(默认值:[]) |
--extra-config <extra-config> | 从给定的配置 YAML 文件中应用附加选项。这将应用到构建的所有容器。(默认为 None) |
--namespace <registry-namespace> | 容器 registry 命名空间(默认: tripleotrain) |
--registry <registry-url> | 容器 registry url (默认: localhost) |
--skip-build | 跳过或不构建镜像的构建(默认: false) |
--tag <image-tag> | 镜像标签(默认:latest) |
--prefix <image-prefix> | 镜像前缀。(默认:openstack) |
--push | 启用镜像推送到给定 registry。(默认为 False) |
--volume <volume-path> | 构建镜像时使用的容器绑定挂载。如果多个 volumes. (default: [/etc/yum.repos.d:/etc/yum.repos.d:z:z ,/etc/pki/rpm- gpg:/etc/pki/rpm-gpg:z]) |
--work-dir <work-directory> | TripleO 容器构建目录,存储各个镜像的配置和日志。(默认值:/tmp/container-builds) |
--rhel-modules <rhel-modules> | 以逗号分隔的 rhel 模块列表,以便其版本启用。示例: mariadb:10.3,virt:8.3。 |