This documentation is for a release that is no longer maintained
See documentation for the latest supported version 3 or the latest supported version 4.8.3.7.3. 创建 registry podman 容器(可选)
registry 容器使用 /opt/registry
目录来保存证书、认证文件以及存储其数据文件。
registry 容器使用 httpd
,并需要 htpasswd
文件进行身份验证。
流程
在
/opt/registry/auth
中创建一个htpasswd
文件供容器使用。htpasswd -bBc /opt/registry/auth/htpasswd <user> <passwd>
$ htpasswd -bBc /opt/registry/auth/htpasswd <user> <passwd>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 将
<user>
替换为用户名,将<passwd>
替换为密码。创建并启动 registry 容器。
Copy to Clipboard Copied! Toggle word wrap Toggle overflow podman start ocpdiscon-registry
$ podman start ocpdiscon-registry
Copy to Clipboard Copied! Toggle word wrap Toggle overflow