11.2. 容器 registry 凭证
osbuild-worker@.service
是一个可启动多个服务实例的模板服务。默认情况下,osbuild-composer
服务总是以一个本地 osbuild-worker
开头,特别是 osbuild-worker@1.service
。osbuild-worker
服务负责与容器 registry 的通信。要启用该服务,请设置 /etc/osbuild-worker/osbuild-worker.toml
配置文件。
在设置 /etc/osbuild-worker/osbuild-worker.toml
配置文件后,您必须重启 osbuild-worker
服务,因为在 osbuild-worker
服务启动时,它只会读取 /etc/osbuild-worker/osbuild-worker.toml
配置文件一次。
要停止服务实例,请使用以下命令重启 systemd 服务:
$ systemctl restart osbuild-worker@*
因此,您可以重启 osbuild-worker
的所有启动实例,特别是 osbuild-worker@1.service
,唯一可能正在运行的服务。
/etc/osbuild-worker/osbuild-worker.toml
配置文件有一个 containers 部分,它带有 auth_field_path
条目,其值是是一个字符串代表用于访问受保护的资源的 containers-auth.json
文件路径。容器 registry 凭证仅在将容器嵌入到镜像中时用于从 registry 中拉取容器镜像。
例如:
[containers] auth_file_path = "/etc/osbuild-worker/containers-auth.json"
其他资源
-
系统上的
containers-auth.json
手册页