CentOS 安装docker和harbor遇到的问题。通过浏览器可以访问并登录harbor,但是无法直接通过Linux的终端登录harbor

鬼画符V 2018-04-27 03:02:52
我尝试在本机虚拟机的Linux系统中搭建一套docker环境,在安装完成之后,通过谷歌浏览器访问是没有问题的

但是在Linux系统里直接登录一致报错,尝试了各种方式,改了好多次配置文件,一直未解决
小弟初次接触这些,配置文件完全仿照百度进行的修改
望各位大神指点一下
以下是配置文件的内容:
1、 /etc/docker/daemon.json
{
"registry-mirrors": ["http://9e054c8b.m.daocloud.io"],
"insecure-registries": []
}
{
"graph": "/mnt/docker-data",
"storage-driver": "overlay"
}
2、/etc/sysconfig/docker
DOCKER_OPTS='--selinux-enabled --log-driver=journald --signature-verification=false --insecure-registry 192.168.13.129'
3、/etc/default/docker
DOCKER_OPTS="--insecure-registry hub.com --bip=192.168.13.129"
4、/home/harbor/docker-compose.yml
version: '2'
services:
log:
image: vmware/harbor-log:v1.2.2
container_name: harbor-log
restart: always
volumes:
- /var/log/harbor/:/var/log/docker/:z
ports:
- 127.0.0.1:1514:514
networks:
- harbor
registry:
image: vmware/registry:2.6.2-photon
container_name: registry
restart: always
volumes:
- /data/registry:/storage:z
- ./common/config/registry/:/etc/registry/:z
networks:
- harbor
ports:
- 5000:5000
environment:
- GODEBUG=netdns=cgo
command:
["serve", "/etc/registry/config.yml"]
depends_on:
- log
logging:
driver: "syslog"
options:
syslog-address: "tcp://127.0.0.1:1514"
tag: "registry"
mysql:
image: vmware/harbor-db:v1.2.2
container_name: harbor-db
restart: always
volumes:
- /data/database:/var/lib/mysql:z
networks:
- harbor
env_file:
- ./common/config/db/env
depends_on:
5、/home/harbor/harbor.cfg
## Configuration file of Harbor


#The IP address or hostname to access admin UI and registry service.
#DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname = 192.168.13.129

#The protocol for accessing the UI and token/notification service, by default it is http.
#It can be set to https if ssl is enabled on nginx.
ui_url_protocol = http

#The password for the root user of mysql db, change this before any production use.
db_password = root123

#Maximum number of job workers in job service
max_job_workers = 3

#Determine whether or not to generate certificate for the registry's token.
#If the value is on, the prepare script creates new root cert and private key
#for generating token to access the registry. If the value is off the default key/cert will be used.
#This flag also controls the creation of the notary signer's cert.
customize_crt = on

#The path of cert and key files for nginx, they are applied only the protocol is set to https
ssl_cert = /data/cert/server.crt
ssl_cert_key = /data/cert/server.key

#The path of secretkey storage
secretkey_path = /data

#Admiral's url, comment this attribute, or set its value to NA when Harbor is standalone
admiral_url = NA

#The password of the Clair's postgres database, only effective when Harbor is deployed with Clair.
#Please update it before deployment, subsequent update will cause Clair's API server and Harbor unable to access Clair's database.
clair_db_password = password

#NOTES: The properties between BEGIN INITIAL PROPERTIES and END INITIAL PROPERTIES
#only take effect in the first boot, the subsequent changes of these properties
#should be performed on web ui

#************************BEGIN INITIAL PROPERTIES************************

#Email account settings for sending out password resetting emails.

...全文
1679 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
hellojimi 2021-07-16
  • 打赏
  • 举报
回复

"insecure-registries": []这里要配置上harbor的地址

hellojimi 2021-07-16
  • 打赏
  • 举报
回复

同样问题,求解

18,773

社区成员

发帖
与我相关
我的任务
社区描述
Linux/Unix社区 专题技术讨论区
社区管理员
  • 专题技术讨论区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧