本篇文章給大家分享的是有關(guān)怎么進(jìn)行VMware Harbor部署,小編覺得挺實用的,因此分享給大家學(xué)習(xí),希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
創(chuàng)新互聯(lián)建站專注于企業(yè)網(wǎng)絡(luò)營銷推廣、網(wǎng)站重做改版、齊齊哈爾網(wǎng)站定制設(shè)計、自適應(yīng)品牌網(wǎng)站建設(shè)、H5場景定制、商城網(wǎng)站開發(fā)、集團(tuán)公司官網(wǎng)建設(shè)、外貿(mào)網(wǎng)站建設(shè)、高端網(wǎng)站制作、響應(yīng)式網(wǎng)頁設(shè)計等建站業(yè)務(wù),價格優(yōu)惠性價比高,為齊齊哈爾等各大城市提供網(wǎng)站開發(fā)制作服務(wù)。
了解一下怎么部署harbor。
OS:Ubuntu 16.04.3 LTS
Kernel:ubuntu16.04-2 4.4.0-87-generic
我跟她https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce_18.03.0~ce-0~ubuntu_amd64.deb
dpkg -i docker-ce_18.03.0_ce-0_ubuntu_amd64.deb
docker info
apt-get install python2.7 python-minimal
curl -L https://github.com/docker/compose/releases/download/1.19.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
ps:不要apt-get install docker-compose安裝,默認(rèn)倉庫中的docker-compose版本太低
curl -L https://raw.githubusercontent.com/docker/compose/1.19.0/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
cd /opt/programs wget https://storage.googleapis.com/harbor-releases/release-1.5.0/harbor-offline-installer-v1.5.1.tgz =========================下載完解壓======================================== tar zxvf harbor-offline-installer-v1.5.1.tgz
/opt/programs/harbor
文件在/opt/programs/harbor/harbor.cfg
_version = 1.5.0 hostname = 192.168.1.6 ui_url_protocol = http max_job_workers = 5 customize_crt = on ssl_cert = /data/cert/server.crt ssl_cert_key = /data/cert/server.key secretkey_path = /data admiral_url = NA log_rotate_count = 5 log_rotate_size = 200M http_proxy = https_proxy = no_proxy = 127.0.0.1,172.31.68.243,ui email_identity = email_server = smtp.mydomain.com email_server_port = 25 email_username = sample_admin@mydomain.com email_password = abc email_from = adminemail_ssl = false email_insecure = false harbor_admin_password = Harbor12345 auth_mode = db_auth ldap_url = ldaps://ldap.mydomain.com ldap_basedn = ou=people,dc=mydomain,dc=com ldap_uid = uid ldap_scope = 2 ldap_timeout = 5 ldap_verify_cert = true ldap_group_basedn = ou=group,dc=mydomain,dc=com ldap_group_filter = objectclass=group ldap_group_gid = cn ldap_group_scope = 2 self_registration = on token_expiration = 30 project_creation_restriction = everyone db_host = MySQL db_password = root123 db_port = 3306 db_user = root redis_url = redis:6379 clair_db_host = postgres clair_db_password = password clair_db_port = 5432 clair_db_username = postgres clair_db = postgres uaa_endpoint = uaa.mydomain.org uaa_clientid = id uaa_clientsecret = secret uaa_verify_cert = true uaa_ca_cert = /path/to/ca.pem registry_storage_provider_name = filesystem registry_storage_provider_config =
./install.sh
docker image ls
docker container ls
http://192.168.1.6
ps:默認(rèn)用戶名密碼是admin/Harbor12345
ps:怎么使用就不詳細(xì)描述了,下面講解一下怎么push鏡像上去,換一臺機(jī)ubuntu機(jī)器執(zhí)行以下命令(ubuntu16.04-2)
#/etc/docker/daemon.json { "registry-mirrors": ["http://aa2fd190.m.daocloud.io"], "insecure-registries":["http://172.31.68.241"] }
#/lib/systemd/system/docker.service # 在service模塊下調(diào)整ExecStart項 [Service] Type=notify ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
systemctl daemon-reload systemctl restart docker.service
systemctl status docker.service
docker login 192.168.1.6
root@ubuntu16.04-2:~#docker login 192.168.1.6 Username (admin): admin Password: Login Succeeded root@ubuntu16.04-2:~#
先檢查當(dāng)前主機(jī)上的image
針對hello-world打tag
ps:里面的ip換成192.168.1.6(實在是沒圖了)
docker tag hello-world:latest 172.31.68.241/library/hello-world:latest
docker push 172.31.68.241/library/hello-world:latest
#/etc/default/docker # 調(diào)整DOCKER_OPTS如下 DOCKER_OPTS="--registry-mirror=http://172.31.68.241 --insecure-registry 172.31.68.241"
systemctl daemon-reload systemctl restart docker.service
docker pull 172.31.68.241/library/hello-world
以上就是怎么進(jìn)行VMware Harbor部署,小編相信有部分知識點可能是我們?nèi)粘9ぷ鲿姷交蛴玫降?。希望你能通過這篇文章學(xué)到更多知識。更多詳情敬請關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。