1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
      Docker游戲倉庫Harbor安裝的步驟詳解

      服務(wù)器

      Harbor安裝那里還是很簡單,就是在Docker Login那里掉坑里去了,搞半天,寫博客的時(shí)候,又重新安裝了一遍

      吳堡網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營維護(hù)。創(chuàng)新互聯(lián)建站于2013年開始到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站

      1.準(zhǔn)備兩臺服務(wù)器

      centos7 harbor 10.19.46.15 client 10.19.44.31

      2.harbor需要安裝docker和docker-composere,client只需要安裝docker

      Docker安裝

      yum install -y yum-utils device-mapper-persistent-data lvm2
      yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
      yum -y install docker-ce
      systemctl start docker

      Docker Compose 安裝

      Docker Compose 安裝
      yum install epel-release
      yum install -y python-pip
      pip install docker-compose
      yum install git
      

      harbor1.8 下載

      https://github.com/goharbor/harbor/releases

      解壓出來

      [root@harbor harbor]# ll
      總用量 32
      -rw-r--r--. 1 root root 4519 5月 21 15:59 harbor.yml
      -rwxr-xr-x. 1 root root 5088 5月 21 15:59 install.sh
      -rw-r--r--. 1 root root 11347 5月 21 15:59 LICENSE
      -rwxr-xr-x. 1 root root 1654 5月 21 15:59 prepare

      修改harbor.yml

      hostname 這里設(shè)置本機(jī)的ip

      harbor_admin_password web頁面的密碼

      運(yùn)行

      sh ./install.sh

      安裝成功

      ......
      Status: Downloaded newer image for goharbor/harbor-registryctl:v1.8.0
      Creating harbor-log ... done
      Creating harbor-db ... done
      Creating registry ... done
      Creating Redis ... done
      Creating registryctl ... done
      Creating harbor-core ... done
      Creating harbor-jobservice ... done
      Creating harbor-portal ... done
      Creating nginx  ... done
      
      ✔ ----Harbor has been installed and started successfully.----
      
      Now you should be able to visit the admin portal at http://10.19.46.15. 
      For more details, please visit https://github.com/goharbor/harbor .

      訪問頁面

      http://10.19.46.15

      如果想要停止,或者是服務(wù)器重啟了,需要手動重啟,在harbor的安裝目錄,里執(zhí)行命令

      [root@harbor harbor]# ll
      總用量 40
      drwxr-xr-x. 3 root root 20 5月 22 22:24 common
      -rw-r-----. 1 root root 5183 5月 22 22:24 docker-compose.yml
      -rw-r--r--. 1 root root 4514 5月 22 22:23 harbor.yml
      -rwxr-xr-x. 1 root root 5088 5月 21 15:59 install.sh
      -rw-r--r--. 1 root root 11347 5月 21 15:59 LICENSE
      -rwxr-xr-x. 1 root root 1654 5月 21 15:59 prepare
      
      # 停止
      [root@harbor harbor]# docker-compose stop
      Stopping nginx  ... done
      Stopping harbor-portal ... done
      Stopping harbor-jobservice ... done
      Stopping harbor-core ... done
      Stopping registryctl ... done
      Stopping redis  ... done
      Stopping registry  ... done
      Stopping harbor-db  ... done
      Stopping harbor-log ... done
      
      # 運(yùn)行
      [root@harbor harbor]# docker-compose start
      Starting log  ... done
      Starting postgresql ... done
      Starting redis ... done
      Starting registry ... done
      Starting core ... done
      Starting jobservice ... done
      Starting portal ... done
      Starting proxy ... done
      Starting registryctl ... done

      在另外一個(gè)服務(wù)器(client)登錄harbor

      [root@client ~]# docker login 10.19.46.15
      Username: admin
      Password: 
      Error response from daemon: Get https://10.19.46.15/v2/: dial tcp 10.19.46.15:443: connect: connection refused

      這是因?yàn)閐ocker1.3.2版本開始默認(rèn)docker registry使用的是https,我們設(shè)置Harbor默認(rèn)http方式,所以當(dāng)執(zhí)行用docker login、pull、push等命令操作非https的docker regsitry的時(shí)就會報(bào)錯(cuò)。

      解決https

      在harbor那臺服務(wù)器,在harbor的安裝目錄

      vim docker-compose.yml

      然后同時(shí)編輯harbor和client的docker配置文件,10.19.46.15 是harbor的ip地址

      # 1.
      vim /etc/docker/daemon.json
      
      {
       insecure-registries: [
       10.19.46.15
       ]
      }
      
      # 2.添加ExecStart=/usr/bin/dockerd |--insecure-registry=10.19.46.15
      vim /usr/lib/systemd/system/docker.service
      
      # 把這行注釋掉,添加下面的配置 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock
      ExecStart=/usr/bin/dockerd
        |--insecure-registry=10.19.46.15

      1.重啟harbor 的 docker-compose,命令文上有
      2.重啟docker

       systemctl daemon-reload
      systemctl restart docker

      client 登錄倉庫

      [root@client ~]# docker login 10.19.46.15 
      Username: admin
      Password: 
      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

      偷工減料

      pull 的命令

      推送和打tag的命令

      以上就是本文的全部內(nèi)容,希望對大家的學(xué)習(xí)有所幫助,也希望大家多多支持創(chuàng)新互聯(lián)。


      當(dāng)前題目:Docker游戲倉庫Harbor安裝的步驟詳解
      文章網(wǎng)址:http://www.ef60e0e.cn/article/chojcc.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        光山县| 社会| 凤冈县| 五指山市| 军事| 南康市| 尼玛县| 伊金霍洛旗| 镶黄旗| 江油市| 灵寿县| 洞头县| 大石桥市| 常熟市| 昌平区| 玉屏| 汽车| 华容县| 叙永县| 塔城市| 西昌市| 灵丘县| 宝兴县| 扎囊县| 潞西市| 仲巴县| 弥渡县| 方山县| 滦平县| 察哈| 牙克石市| 鄂托克旗| 肇州县| 罗田县| 永丰县| 略阳县| 福泉市| 大余县| 左云县| 唐河县| 昌邑市|