安装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
报错信息
root@server02:~/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
root@server02:~/harbor#