Docker 注册表-特权访问

Docker 注册表-特权访问

我正在尝试运行自己的 Docker 注册表,但我不希望任何人能够推送到我的注册表。我看到了一些称为特权访问的选项(https://github.com/docker/docker-registry/blob/master/ADVANCED.md)。我知道如何生成密钥,但找不到如何使用我的私钥/公钥对来推送容器。是否可以使用此特权访问功能将容器推送到私有注册表中?

答案1

我认为您需要在启动客户端 docker 守护进程时设置一些标志。您没有说明您的操作系统,但在 Ubuntu 上,您可以在其中找到您的标志,更改/etc/default/docker这些标志并重新启动服务sudo service docker restart

可能的选择是:https://docs.docker.com/reference/commandline/cli/#daemon --tls=false Use TLS; implied by --tlsverify flag --tlscacert="/home/sven/.docker/ca.pem" Trust only remotes providing a certificate signed by the CA given here --tlscert="/home/sven/.docker/cert.pem" Path to TLS certificate file --tlskey="/home/sven/.docker/key.pem" Path to TLS key file --tlsverify=false Use TLS and verify the remote (daemon: verify client, client: verify daemon)

答案2

显然该项目的 Python 实现目前已经过时,并被其合作者存档,新的开发分支正在 Golang 上运行,你可以在这里查看https://github.com/docker/distribution

相关内容