# Nexus Repository Setting ## Docker Proxy 1. 建立 Docker Proxy Repository - 每個 Repository 都要設定 HTTPS Port 且不能重複。 - Remote storage 設定為: https://registry-1.docker.io/ - Docker Index 設定為: Use Docker Hub ![](https://i.imgur.com/ZEeVQRc.png) 2. Docker Client 設定 - 使用 Nexus Account 登入 Docker Registry ``` root@gorilla-System-Product-Name:/home/gorilla# docker login 192.168.0.111:18443 Authenticating with existing credentials... WARNING! Your password will be stored unencrypted in /root/.docker/config.json. Configure a credential helper to remove this warning. See https://docs.docker.com/engine/reference/commandline/login/#credentials-store Login Succeeded root@gorilla-System-Product-Name:/home/gorilla# ``` - 修改 daemon.json ``` vim /etc/docker/daemon.json ``` ``` { "insecure-registries": [ "192.168.0.111:18443" ], "registry-mirrors": ["https://192.168.0.111:18443"] } ``` - Pull docker image from nexus docker proxy: ``` root@gorilla-System-Product-Name:/home/gorilla# docker pull 192.168.0.111:18443/ubuntu:22.04 22.04: Pulling from ubuntu Digest: sha256:4b1d0c4a2d2aaf63b37111f34eb9fa89fa1bf53dd6e4ca954d47caebca4005c2 Status: Image is up to date for 192.168.0.111:18443/ubuntu:22.04 192.168.0.111:18443/ubuntu:22.04 root@gorilla-System-Product-Name:/home/gorilla# ```