In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Harbor is vmware's open source enterprise docker registry project Harbor's advantages Role-based control Mirror-based replication strategy Support LDAP/AD image deletion and garbage collection Graphical UI audit RESTful API Harbor architecture Composition Proxy: Unified acceptance of browser, docker client requests through a front-end reverse proxy, and forward the request to different back-end services Registry: responsible for storing Docker images, and processing docker push/pull commands Core services: Harbor core functions, including UI, webhook, token services Database: provides database services for core services Log collector: responsible for collecting logs of other components for future analysis Docker private repository architecture topology
Proxy: A front-end reverse proxy uniformly accepts requests from browsers and Docker clients and forwards the requests to different back-end services. Registry: responsible for storing Docker images and handling docker push/pull commands. Core services: Harbor's core functions, including UI, webhook, token services. Database: Provides database services for core services. Log collector: responsible for collecting logs of other components for later analysis.
The user requests to access Core services through Proxy reverse proxy, UI provides web interface, token token, after your first login, the server will give you a string of serial number, next login directly, you need to download the image information, attributes, are stored in the database behind, and then through the webhook callback to the registry private repository to retrieve the image. This series of operations is stored in the log.
Experimental environment docker private library server 192.168.13.128 (docker, Harbor, docker-compose) docker client 192.168.13.129 (docker) 1, configure harbor private library server [root@harbor ~]# mount.cifs //192.168.100.3/LNMP-C7 for root@//192.168.100.3/LNMP-C7:[root@ harbour ~]# cd /mnt/[root@ harbour mnt]# cd docker/[root @ harbour docker]# cp docker-compose /usr/local/bin/ ##install compose tool [root@ harbour docker]# tar zxvf harbor-offline-installer-v1.2.2.tgz -C /usr/local/ ##decompress [root@ harbour docker]# cd /usr/local/harbour/[root@ harbour docker] harbor harbor]# vim harbor.cfg ##Modify harbor configuration file hostname = 192.168.13.128 ##Modify host to local address harbor_admin_password = Harbor12345 ##harbor password [root@harbor]# sh /usr/local/harbor/install.sh ##Start harbor[root@harbor harbor]# docker images ##Mirror information [root@harbor harbor]# docker ps -a ##View container info 49b88d8877ae vmware/registry:2.6.2-photon "/entrypoint.sh serv…" 5000/tcp registry[root@harbor harbor]# docker-compose ps ##Simple container information 2, log in to Harbor private library web interface
3. Log in to the private library on the harbor server [root@harbor harbor]# docker login -uadmin -p Harbor12345 http://127.0.0.1 ##Log in to the private library [root@harbor harbor]# docker pull cirros ##Download the image from the public [root@harbor harbor]# docker tag cirros 127.0.0.1/myproject-kgc/cirros:v1 ##Modify the tag [root@harbor harbor]# docker push 127.0.0.1/myproject-kgc/cirros:v1 ##Upload to the private library ##Access the private library information on the web
4. Log in to the private library with client [root@client ~]# vim /usr/lib/systemd/system/docker.service ##Modify docker configuration file ExecuStart =/usr/bin/dockerd -H fd:// --nsecure-registry 192.168.13.128--cont ainerd=/run/containerd/containerd.sock##Add private library server address [root@client ~]# systemctl daemon-reload ##overloaded daemon [root@client ~]# systemctl restart docker ##Restart container [root@client ~]# docker login -uadmin -pHarbor12345 http://192.168.13.128 ##Login to private repository [root@client ~]# docker pull cirros ##Download image from public repository [root@client ~]# docker pull 192.168.13.128/myproject-kgc/cirros:v1 ##Download image from private repository [root@client ~]# docker tag cirros:latest 192.168.13.128/myproject-kgc/cirros:v2 ##Modify tag [root@client ~]# docker push 192.168.13.128/myproject-kgc/cirros:v2 ##Upload to private repository server ##View with web interface
5. Manage the private library, configure [root@harbor harbor]# docker-compose down -v ##on the harbor server to close all containers with compose management [root@harbor harbor]# vim harbor.cfg ##Modify the configuration file [root@harbor harbor]# ./ prepare ##Reload takes effect [root@harbor harbor]# docker-compose up -d ##Open all containers
##Log in with client [root@client ~]# docker logout http://192.168.13.128 ##Log out of administrator first Removing login credentials for 192.168.13.128[root@client ~]# docker login http://192.168.13.128 ##Log in with new user Username: test01 Password: 6, if you want to redeploy, you need to remove all server data while keeping mirrored data/database [root@harbor harbor]# docker-compose down -v ##Close all container logs first Data stored on host/var/log/harbor, mirror deletion: The requested URL/data/index.php was not found on this server.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 217
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.