上午打球,下午陪小孩子看上海科技展,晚上搞定harbor。
完美!!!:)
参考文档:
https://www.dwhd.org/20161023_110618.html
http://blog.csdn.net/cuipengchong/article/details/68496627
http://www.tuicool.com/articles/RvAF7nn
http://www.cnblogs.com/HendSame-JMZ/p/6020580.html
但安装docker-compose时注意pip软件包的名称。
yum install python-pip
然后,启停harbor都是通过compose文件操作的。
注意 : Docker 服务重启后,执行 docker-compose start
时有一定几率出现如下错误(或者目录已存在等错误),此时在 docker-compose stop
一下然后在启动即可,实在不行再次重启 Dokcer 服务,千万不要手贱的去删文件(别问我怎么知道的)
几个配置还是搞了一阵,关键几个文件内容如下:
cat 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.1.111 #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 = password #Maximum number of job workers in job service max_job_workers = 3
at /usr/lib/systemd/system/docker.service [Unit] Description=Docker Application Container Engine Documentation=https://docs.docker.com After=network.target firewalld.service [Service] Type=notify # the default is not to use systemd for cgroups because the delegate issues still # exists and systemd currently does not support the cgroup feature set required # for containers run by docker EnvironmentFile=-/etc/default/docker # ExecStart=/usr/bin/dockerd ExecStart=/usr/bin/dockerd --insecure-registry 192.168.1.111 ExecReload=/bin/kill -s HUP $MAINPID # Having non-zero Limit*s causes performance problems due to accounting overhead # in the kernel. We recommend using cgroups to do container-local accounting. LimitNOFILE=infinity LimitNPROC=infinity LimitCORE=infinity
时间: 2024-11-01 07:53:54