docker 私人仓库 设置密码报错(已解决)

rhel7.9 搭建docker registry 的时候,需要密码登录,x509 证书认证,在htpasswd 生成密码的时候报错:

$ docker run --entrypoint htpasswd registry:latest -Bbn test 123456  >> /opt/docker/registry/auth/htpasswd
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "htpasswd": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled 

多次试验之后,终于解决了,解决方法如下:

$ yum -y install httpd

$  htpasswd -Bbn test 123456  > auth/htpasswd

上一篇:[SCOI2010]股票交易


下一篇:Elasticsearch 开启安全认证