Harbor安装那里还是很简单,就是在Docker Login那里掉坑里去了,搞半天,写博客的时候,又重新安装了一遍
1.准备两台服务器
- 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 这里设置本机的ip
harbor_admin_password web页面的密码
运行
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 "text-align: center">![]()
如果想要停止,或者是服务器重启了,需要手动重启,在harbor的安装目录,里执行命令
[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 # 运行 [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在另外一个服务器(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这是因为docker1.3.2版本开始默认docker registry使用的是https,我们设置Harbor默认http方式,所以当执行用docker login、pull、push等命令操作非https的docker regsitry的时就会报错。
解决https
在harbor那台服务器,在harbor的安装目录
vim docker-compose.yml然后同时编辑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.151.重启harbor 的 docker-compose,命令文上有
2.重启dockersystemctl daemon-reload systemctl restart dockerclient 登录仓库
[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的命令
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持。
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
稳了!魔兽国服回归的3条重磅消息!官宣时间再确认!
昨天有一位朋友在大神群里分享,自己亚服账号被封号之后居然弹出了国服的封号信息对话框。
这里面让他访问的是一个国服的战网网址,com.cn和后面的zh都非常明白地表明这就是国服战网。
而他在复制这个网址并且进行登录之后,确实是网易的网址,也就是我们熟悉的停服之后国服发布的暴雪游戏产品运营到期开放退款的说明。这是一件比较奇怪的事情,因为以前都没有出现这样的情况,现在突然提示跳转到国服战网的网址,是不是说明了简体中文客户端已经开始进行更新了呢?
更新日志
- 小骆驼-《草原狼2(蓝光CD)》[原抓WAV+CUE]
- 群星《欢迎来到我身边 电影原声专辑》[320K/MP3][105.02MB]
- 群星《欢迎来到我身边 电影原声专辑》[FLAC/分轨][480.9MB]
- 雷婷《梦里蓝天HQⅡ》 2023头版限量编号低速原抓[WAV+CUE][463M]
- 群星《2024好听新歌42》AI调整音效【WAV分轨】
- 王思雨-《思念陪着鸿雁飞》WAV
- 王思雨《喜马拉雅HQ》头版限量编号[WAV+CUE]
- 李健《无时无刻》[WAV+CUE][590M]
- 陈奕迅《酝酿》[WAV分轨][502M]
- 卓依婷《化蝶》2CD[WAV+CUE][1.1G]
- 群星《吉他王(黑胶CD)》[WAV+CUE]
- 齐秦《穿乐(穿越)》[WAV+CUE]
- 发烧珍品《数位CD音响测试-动向效果(九)》【WAV+CUE】
- 邝美云《邝美云精装歌集》[DSF][1.6G]
- 吕方《爱一回伤一回》[WAV+CUE][454M]