[root@c7-45 docker]# docker run --entrypoint htpasswd registry:2 -Bbn testuser testpassword
docker: Error response from daemon: OCI runtime create failed: container_linux.go:349: starting container process caused "exec: \"htpasswd\": executable file not found in $PATH": unknown.
ERRO[0000] error waiting for container: context canceled 

今天一直出现这个问题
参考
在这里插入图片描述
然后解决了 我觉得 应该是 镜像版本的问题导致的不匹配

[root@c7-45 docker]# docker run --entrypoint htpasswd registry:2.6.2 -Bbn testuser testpassword
testuser:$2y$05$TR89A66hXNOZ.ACTBJwBNe/Nga71irZ9Cw7fT0egdgpCEzKu840XG

[root@c7-45 docker]# ls
auth  certs
[root@c7-45 docker]# docker run --entrypoint htpasswd registry:2.6.2 -Bbn admin westos > auth/htpasswd 
Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐