部署不安全的docker私有仓库(insecure-registries)

Docker仓库:

  1. Edit the daemon.json file, whose default location is /etc/docker/daemon.json on Linux orC:\ProgramData\docker\config\daemon.json on Windows Server. If you use Docker Desktop for Mac or Docker Desktop for Windows, click the Docker icon, choose Preferences, and choose +Daemon.If the daemon.json file does not exist, create it. Assuming there are no other settings in the file, it should have the following contents:{ "insecure-registries" : ["myregistrydomain.com:5000"] } Substitute the address of your insecure registry for the one in the example.With insecure registries enabled, Docker goes through the following steps:
    • First, try using HTTPS.
      • If HTTPS is available but the certificate is invalid, ignore the error about the certificate.
      • If HTTPS is not available, fall back to HTTP.
  2. Restart Docker for the changes to take effect.

Docker客户端

Repeat these steps on every Engine host that wants to access your registry.

结论:dcoker仓库和docker客户端都要配置 insecure-registries 。切记切记!

参考:

https://docs.docker.com/registry/insecure/

此条目发表在其他分类目录,贴了标签。将固定链接加入收藏夹。

发表评论

电子邮件地址不会被公开。

*