您好,登錄后才能下訂單哦!
本篇文章給大家分享的是有關怎么進行VMware Harbor部署,小編覺得挺實用的,因此分享給大家學習,希望大家閱讀完這篇文章后可以有所收獲,話不多說,跟著小編一起來看看吧。
了解一下怎么部署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安裝,默認倉庫中的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 = admin <sample_admin@mydomain.com> email_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:默認用戶名密碼是admin/Harbor12345
ps:怎么使用就不詳細描述了,下面講解一下怎么push鏡像上去,換一臺機ubuntu機器執行以下命令(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模塊下調整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:~#
先檢查當前主機上的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 # 調整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
以上就是怎么進行VMware Harbor部署,小編相信有部分知識點可能是我們日常工作會見到或用到的。希望你能通過這篇文章學到更多知識。更多詳情敬請關注億速云行業資訊頻道。
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。