In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
Why do we need private warehouses? most of them are for speed. The speed of push and pull in private warehouses is very fast.
Use registry to build quickly
Https://hub.docker.com/_/registry/
Run a local registry: Quick Version$ docker run-d-p 5000 name registry registry:2Now 5000-restart always-name registry registry:2Now, use it from within Docker:$ docker pull ubuntu$ docker tag ubuntu localhost:5000/ubuntu$ docker push localhost:5000/ubuntu
This is an official little demo. Here is my own practice.
# pull registry2.0 version [root@FantJ ~] # docker pull registry:2Trying to pull repository docker.io/library/registry. 2: Pulling from docker.io/library/registry81033e7c1d6a: Pull complete b235084c2315: Pull complete c692f3a6894b: Pull complete ba2177f3a70e: Pull complete a8d793620947: Pull complete Digest: sha256:672d519d7fd7bbc7a448d17956ebeefe225d5eb27509d8dc5ce67ecb4a0bce54Status: Downloaded newer image for docker.io/registry:2# background launch and run [root@FantJ ~] # docker run-d-p 5000 docker run-- restart always-- name registry registry:2ce5b8bfa6d7f535906730ea3a058b00e7cfdaaa20ea0db3c49d700a4e2c8a645 [root@FantJ ~] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEdocker.io/openjdk 8-jre bef23b4b9cac 2 weeks ago 443 MBdocker.io/fantj/nginx latest ae513a47849c 4 weeks ago 109 MBdocker.io/nginx latest ae513a47849c 4 weeks ago 109 MBdocker.io/registry 2 d1fd7d86a825 4 months ago 33.3 MB# tag Image [root@FantJ] # docker tag docker.io/nginx 127. 0.0.1:5000/nginx# uploads to private warehouse [root@FantJ ~] # docker push 127.0.0.1:5000/nginxThe push refers to a repository [127.0.0.1:5000/nginx] 7ab428981537: Pushed 82b81d779f83: Pushed d626a8ad97a1: Pushed latest: digest: sha256:e4f0474a75c510f40b37b6b7dc2516241ffa8bde5a442bde3d372c9519c84d90 size: 948 [root@FantJ ~] #
Disadvantages: there is no visual management tool, private warehouse service downtime causes trouble, no user management mechanism, no operation recording function.
Advantages: easy to build and operate
Using harbor to build
Download address: https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installer-v1.5.1.tgz
Wget https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installer-v1.5.1.tgztar zxvf harbor-offline-installer-v1.5.1.tgzcd harbor
Modify configuration harbor.cfg
Hostname = fantj.top:8888
Http or https or something. Watch and change.
Save exit and run install.sh directly
Cd... / install.sh
One thing to note: harbor occupies port 80 by default, so please make sure that your port 80 is not occupied, how to modify it?
Modify the configuration docker-compose.yml (you need to change the port)
Change the first 80 at 80:80 to a custom port number
I'll change it to port 8888 here.
Then run install.sh
. [Step 4]: starting Harbor... Creating network "harbor_harbor" with the default driverCreating harbor-logCreating redisCreating registryCreating harbor-dbCreating harbor-adminserverCreating harbor-uiCreating nginxCreating harbor-jobservice ✔-Harbor has been installed and started successfully.----Now you should be able to visit the admin portal at http://fantj.top:8888. For more details, please visit https://github.com/vmware/harbor.
Okay, it worked. Let's have a visit.
Default account password:
Admin
Harbor12345
If you want to modify it, go to harbor.cfg.
[root@FantJ harbor] # docker psCONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMESea66b87c5d26 vmware/harbor-jobservice:v1.5.1 "/ harbor/start.sh" 7 minutes ago Up 7 minutes harbor-jobservice5fecbc47ea68 vmware/nginx-photon:v1.5.1 "nginx-g'daemon..." 7 minutes ago Up 7 minutes (healthy) 0.0.0.0 minutes 443-> 443/tcp 0.0.0.0PUR 4443-> 4443/tcp 0.0.0.0minutes 8888-> 80/tcp nginx9ccfa0d137de vmware/harbor-ui:v1.5.1 "/ harbor/start.sh" 7 minutes ago Up 7 minutes (healthy) harbor-uib1f6387545d6 vmware/harbor-db:v1.5.1 "/ usr/local/bin/do..." 7 minutes ago Up 7 minutes (healthy) 3306/tcp Harbor-db6bcd46635374 vmware/registry-photon:v2.6.2-v1.5.1 "/ entrypoint.sh se..." 7 minutes ago Up 7 minutes (healthy) 5000/tcp registryc40db866f7d2 vmware/harbor-adminserver:v1.5.1 "/ harbor/start.sh" 7 minutes ago Up 7 minutes (healthy) Harbor-adminserver8d0ee20abfbf vmware/redis-photon:v1.5.1 "docker-entrypoint..." 7 minutes ago Up 7 minutes 6379/tcp redis17c002dd8b98 vmware/harbor-log:v1.5.1 "/ bin/sh-c / usr/l..." 7 minutes ago Up 7 minutes (healthy) 127.0.0.1 minutes ago Up 1514-> 10514/tcp Harbor-log [root@FantJ harbor] # docker imagesREPOSITORY TAG IMAGE ID CREATED SIZEvmware/redis-photon v1.5.1 19245c7a4f51 3 days ago 207 MBvmware/clair-photon v2.0.1-v1.5.1 e7f0ab982469 3 days ago 303 MBvmware/notary-server-photon v0.5.1-v1.5.1 611385e920c3 3 days ago 211 MBvmware/notary-signer-photon V0.5.1-v1.5.1 f9e01495db0e 3 days ago 209 MBvmware/registry-photon v2.6.2-v1.5.1 2efae6b250b1 3 days ago 198 MBvmware/nginx-photon v1.5.1 90d35cd72a68 3 days ago 135 MBvmware/harbor-log v1.5.1 67000769dfac 3 days ago 200 MBvmware/harbor-jobservice v1.5.1 3f7a7987ca5b 3 days ago 194 MBvmware/harbor-ui V1.5.1 8dbe945233a8 3 days ago 212 MBvmware/harbor-adminserver v1.5.1 a11b8eb3f9d8 3 days ago 183 MBvmware/harbor-db v1.5.1 afa780d73279 3 days ago 526 MBvmware/mariadb-photon v1.5.1 59ed57632415 3 days ago 526 MBvmware/postgresql-photon v1.5.1 41b693c0ce50 3 days ago 221 MBdocker.io/openjdk 8- Jre bef23b4b9cac 2 weeks ago 443 MBvmware/harbor-migrator v1.5.0 466c57ab0dc3 4 weeks ago 1.16 GB127.0.0.1:5000/nginx latest ae513a47849c 4 weeks ago 109 MBdocker.io/fantj/nginx latest ae513a47849c 4 weeks ago 109 MBdocker.io/nginx latest ae513a47849c 4 weeks ago 109 MBvmware/photon 1.0 4b481ecbef2a 5 weeks Ago 130 MBdocker.io/registry 2 d1fd7d86a825 4 months ago 33.3 MB
You can see that we have a lot more processes and images that start with vmware (harbor is an open source tool of vmware).
All right, start the push test.
[root@FantJ harbor] # docker tag docker.io/nginx fantj.top:8888/internet-plus/nginx [root@FantJ harbor] # docker push fantj.top:8888/internet-plus/nginxThe push refers to a repository [fantj.top:8888/internet-plus/nginx] Get https://fantj.top:8888/v1/_ping: dial tcp: lookup fantj.top: no such host
It indicates that a https request is required to be secure, and there are two ways to solve it:
First: add the trust to the domain name + port when docker starts-- insecure-registry=xxxx.xx.xx.xx:8888
Second: add ssl certificate and update it another day
Harbor restart
# docker-compose stop#. / install.sh
The above is the whole content of this article, I hope it will be helpful to your study, and I also hope that you will support it.
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: 0
*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.