docker本地注册表“ exec:\“ htpasswd \”:在$ PATH中找不到可执行文件”

斯科特·斯滕斯兰德

直到最近,这一切正常

docker run --entrypoint htpasswd registry:2 -Bbn myuser  mypwd  > /my/registry2/reg/hub/auth/htpasswd

现在它的错误与


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.

这是在docker的Ubuntu 18.04和20.04上

docker version
Client: Docker Engine - Community
 Version:           19.03.11
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        42e35e61f3
 Built:             Mon Jun  1 09:12:22 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.11
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       42e35e61f3
  Built:            Mon Jun  1 09:10:54 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

斯科特·斯滕斯兰德

如果您将本地Docker注册表固定到以下位置,它将继续工作:

registry:2.7.0

而不是仅使用来获取最新版本2 registry:2

详情参见https://github.com/GoogleContainerTools/jib/pull/2538/commits/f816c837e34eb389c2cdee1bc9a2918c5d2e33e3https://github.com/GoogleContainerTools/jib/pull/2539作为参考https://github.com/docker / distribution-library-image / issues / 106

或者,您可以使用以下命令安装二进制htpasswd,而不是从注册表内部执行htpasswd:2

apt-get install apache2-utils # thankfully this is NOT the apache server

并使用语法

htpasswd -Bbn myuser  mypwd  > /my/registry2/reg/hub/auth/htpasswd

在Ubuntu 18.04或20.04上

PS这里的所有文件都来自apache2-utils包...只是一些实用程序,而不是任何服务器

dpkg -L apache2-utils 

/.
/usr
/usr/bin
/usr/bin/ab
/usr/bin/checkgid
/usr/bin/fcgistarter
/usr/bin/htcacheclean
/usr/bin/htdbm
/usr/bin/htdigest
/usr/bin/htpasswd
/usr/bin/logresolve
/usr/bin/rotatelogs
/usr/sbin
/usr/sbin/check_forensic
/usr/sbin/httxt2dbm
/usr/sbin/split-logfile
/usr/share
/usr/share/doc
/usr/share/doc/apache2-utils
/usr/share/doc/apache2-utils/changelog.Debian.gz
/usr/share/doc/apache2-utils/copyright
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/ab.1.gz
/usr/share/man/man1/htdbm.1.gz
/usr/share/man/man1/htdigest.1.gz
/usr/share/man/man1/htpasswd.1.gz
/usr/share/man/man1/httxt2dbm.1.gz
/usr/share/man/man1/logresolve.1.gz
/usr/share/man/man8
/usr/share/man/man8/check_forensic.8.gz
/usr/share/man/man8/checkgid.8.gz
/usr/share/man/man8/fcgistarter.8.gz
/usr/share/man/man8/htcacheclean.8.gz
/usr/share/man/man8/rotatelogs.8.gz
/usr/share/man/man8/split-logfile.8.gz

为了很好的措施,我在此https://github.com/docker/docker.github.io/issues/11060上给docker订了票

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

“ sqlplus”:使用docker exec运行命令时,在$ PATH中找不到可执行文件

docker-exec失败:“ cd”:在$ PATH中找不到可执行文件

exec:“ com.docker.cli”:在$ PATH中找不到可执行文件

exec:“ docker-runc”:在$ PATH中找不到可执行文件:未知

Docker容器构建失败:“ exec:\” flask \”:在$ PATH中找不到可执行文件”:未知

尝试详细运行docker容器或docker exec时,在$ PATH中找不到错误可执行文件

Golang docker多阶段构建无法运行:exec:“ go”:在$ PATH中找不到可执行文件

Docker基本映像:无法启动容器XXX:exec:“ cat”:在$ PATH中找不到可执行文件

exec:在$ PATH中找不到可执行文件

运行docker容器时出错:启动容器过程导致“ exec:\” python \”:在$ PATH中找不到可执行文件”:未知

“ docker exec mycontainer --user root”失败,出现“ --user”:找不到可执行文件

godep:exec:“执行”:在$ PATH中找不到可执行文件

gcloud app deploy说:exec:“ git”:在$ PATH中找不到可执行文件

“ exec:\” go \“:在$ PATH中找不到可执行文件”

系统错误:exec:“部署”:在$ PATH中找不到可执行文件

exec:“ gcc”:尝试进行构建时,在%PATH%中找不到可执行文件

exec:“ sqlboiler”:在$ PATH中找不到可执行文件

Go moq:运行“ moq”:exec:“ moq”:在$ PATH中找不到可执行文件

“ exec:” python“:在$ PATH中找不到可执行文件

CloudFoundry暂存错误exec:“ git”:在$ PATH中找不到可执行文件

exec:“ php-fpm”:在$ PATH中找不到可执行文件:未知

Docker --env文件-在$ PATH中找不到可执行文件

找不到Docker映像中的可执行文件

启动容器过程导致“ exec:> \“ exec \”:在$ PATH中找不到可执行文件”:未知

cgo: exec gcc: exec: "gcc": 在 $PATH 中找不到可执行文件 Egress operator 安装错误

Docker 的“在 $PATH 中找不到可执行文件:未知”试图运行“cd”

Docker --mount抛出:$ PATH中找不到可执行文件”

Docker,\“ ping \”:在$ PATH中找不到可执行文件“:未知

使用AWS Batch / ECS时在PATH中找不到Docker可执行文件