1. 程式人生 > >harbor安裝小坑

harbor安裝小坑

安裝harbor需要將hostname修改為本機ip,然後我也修改了(我是先複製了當前hostname那行並註釋掉,然後再修改的,如下),但是執行./install.sh安裝時候一直報錯

#hostname = reg.mydomain.com
hostname = 192.168.174.136

然後看install.sh 指令碼,發現指令碼是grep原指令碼進行校驗的,如下:

# The hostname in harbor.cfg has not been modified
if grep 'hostname = reg.mydomain.com' &> /dev/null harbor.cfg
then
        echo "my test"
        warn "$usage"
        exit 1
fi

報錯資訊 [email protected]:~/harbor# ./install.sh my test ➜ Please set hostname and other necessary attributes in harbor.cfg first. DO NOT use localhost or 127.0.0.1 for hostname, because Harbor needs to be accessed by external clients. Please set --with-notary if needs enable Notary in Harbor, and set ui_url_protocol/ssl_cert/ssl_cert_key in harbor.cfg bacause notary must run under https. Please set --with-clair if needs enable Clair in Harbor

[email protected]:~/harbor#