安装harbor作为docker镜像仓库的问题


Posted in Servers onJune 14, 2022

安装包

docker-20.10.9.tgz

docker-compose

百度网盘下载以上两个包

链接: https://pan.baidu.com/s/1Xy6vkkxUGLmSDwrVk8ej-A 提取码: gc8r 

docker.service 如下:

[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target firewalld.service
Wants=network-online.target
[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
# 开启远程连接 
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:2375 -H unix:///var/run/docker.sock
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
# Uncomment TasksMax if your systemd version supports it.
# Only systemd 226 and above support this version.
#TasksMax=infinity
TimeoutStartSec=0
# set delegate yes so that systemd does not reset the cgroups of docker containers
Delegate=yes
# kill only the docker process, not all processes in the cgroup
KillMode=process
# restart the docker process if it exits prematurely
Restart=on-failure
StartLimitBurst=3
StartLimitInterval=60s
[Install]
WantedBy=multi-user.target

一、docker和docker-compose离线部署

1、上传docker-20.10.9.tgz安装包并解压

tar  -zxvf  docker-20.10.9.tgz 
cp docker/*  /usr/bin/

2、docker.service文件

mv docker.service /usr/lib/systemd/system/

3、启动Docker

systemctl daemon-reload 
systemctl enable docker 
systemctl start docker 
systemctl status docker

4、docker-compose部署

cp -r docker-compose /usr/local/bin/ 
cp -r docker-compose /usr/local/sbin/ 
chmod a+x /usr/local/bin/docker-compose 
chmod a+x /usr/local/sbin/docker-compose

5、测试docker-compose

docker-compose -v

二、安装harbor作为本地的仓库

  Harbor是一个开源的可信云本地注册项目,用于存储、签名和扫描内容。Harbor通过添加用户通常需要的功能(如安全性、身份和管理)扩展了开源Docker发行版。使注册表更接近构建和运行环境可以提高图像传输效率。

1、解压harbor-offline-installer-v2.3.0.tgz

tar xvf harbor-offline-installer-v1.9.3.tgz

2、进入harbor目录,修改harbor.yml

cp -r harbor.yml.tmpl harbor.yml 
vi harbor.yml
复制代码
hostname: 192.168.4.xxx                    ##对应服务器IP 
port: 80                                   ##对应harbor应用端口   
#  port: 443                               ##屏蔽https 
#  certificate: /your/certificate/path     ##屏蔽https 
#  private_key: /your/private/key/path     ##屏蔽https  
harbor_admin_password: llsydn123           ##harbor登录密码,根据情况修改

3、配置docker client,编辑/etc/docker/daemon.json

Harbor的默认安装使用HTTP—因此,您需要将选项“-unsecure registry”添加到客户端的Docker守护进程,并重新启动Docker服务。

vi /etc/docker/daemon.json  {"insecure-registries" : [ "192.168.4.xxx" ] }
  • 重启docker
service docker restart

4、安装 Harbor

./install.sh

安装harbor作为docker镜像仓库的问题

5、访问harbor

http://<your_harbor_host_ip

默认用户名和密码:admin/llsydn123

好了,以上就是我个人的实操了。

到此这篇关于聊聊安装harbor作为docker镜像仓库的问题的文章就介绍到这了,更多相关docker镜像仓库harbor内容请搜索三水点靠木以前的文章或继续浏览下面的相关文章希望大家以后多多支持三水点靠木!


Tags in this post...

Servers 相关文章推荐
Nginx下SSL证书安装部署步骤介绍
Dec 06 Servers
NGINX 权限控制文件预览和下载的实现原理
Jan 18 Servers
Nginx防盗链与服务优化配置的全过程
Jan 18 Servers
使用kubeadm命令行工具创建kubernetes集群
Mar 31 Servers
nginx容器方式反向代理实战
Apr 18 Servers
Windows Server 2012 R2 磁盘分区教程
Apr 29 Servers
nginx 配置指令之location使用详解
May 25 Servers
Nginx安装配置详解
Jun 25 Servers
windows系统安装配置nginx环境
Jun 28 Servers
在虚拟机中安装windows server 2008的图文教程
Jun 28 Servers
CentOS7 minimal 最小化安装网络设置过程
Dec 24 Servers
openEuler 搭建java开发环境的详细过程
Jun 10 #Servers
WinServer2012搭建DNS服务器的方法步骤
Jun 10 #Servers
windows server 2012安装FTP并配置被动模式指定开放端口
Jun 10 #Servers
Win Server2016远程桌面如何允许多用户同时登录
Jun 10 #Servers
教你如何用cmd快速登录服务器
winserver2019安装软件一直卡在应用程序正在为首次使用做准备
Jun 10 #Servers
永中文档在线转换预览基于nginx配置部署方案
You might like
PHP has encountered an Access Violation 错误的解决方法
2010/01/17 PHP
php计数排序算法的实现代码(附四个实例代码)
2020/03/31 PHP
PNG背景在不同浏览器下的应用
2009/06/22 Javascript
关于递归运算的顺序测试代码
2011/11/30 Javascript
js隐式全局变量造成的bug示例代码
2014/04/22 Javascript
重写document.write实现无阻塞加载js广告(补充)
2014/12/12 Javascript
JS实现图片放大镜效果的方法
2015/02/27 Javascript
原生JavaScript实现滚动条效果
2020/03/24 Javascript
AngularJS整合Springmvc、Spring、Mybatis搭建开发环境
2016/02/25 Javascript
javascript将中国数字格式转换成欧式数字格式的简单实例
2016/08/02 Javascript
node.js操作mysql简单实例
2017/05/25 Javascript
jQuery实现锚点向下平滑滚动特效示例
2017/08/29 jQuery
基于bootstrap写的一点localStorage本地储存
2017/11/21 Javascript
基于模板引擎Jade的应用(详解)
2017/12/12 Javascript
解决vue的 v-for 循环中图片加载路径问题
2018/09/03 Javascript
JS实现动态添加外部js、css到head标签的方法
2019/06/05 Javascript
Vue中对iframe实现keep alive无刷新的方法
2019/07/23 Javascript
微信小程序云开发如何实现数据库自动备份实现
2019/08/16 Javascript
vue从零实现一个消息通知组件的方法详解
2020/03/16 Javascript
python安装PIL模块时Unable to find vcvarsall.bat错误的解决方法
2016/09/19 Python
Python函数装饰器实现方法详解
2018/12/22 Python
Django网络框架之HelloDjango项目创建教程
2019/06/06 Python
selenium处理元素定位点击无效问题
2019/06/12 Python
Python 窗体(tkinter)按钮 位置实例
2019/06/13 Python
Python实现网络聊天室的示例代码(支持多人聊天与私聊)
2021/01/27 Python
HUGO BOSS美国官方网上商店:世界知名奢侈品牌
2017/08/04 全球购物
trivago美国:全球最大的酒店价格比较网站
2018/01/18 全球购物
俄罗斯韩国化妆品网上商店:Cosmasi.ru
2019/10/31 全球购物
西班牙在线药店:DosFarma
2020/03/28 全球购物
奥林匹亚体育:Olympia Sports
2020/12/30 全球购物
心理健康活动总结
2014/04/30 职场文书
英语专业求职信
2014/07/08 职场文书
听课评课活动心得体会
2016/01/15 职场文书
基于python的matplotlib制作双Y轴图
2021/04/20 Python
Docker安装MySql8并远程访问的实现
2022/07/07 Servers
MyBatis XPathParser解析器使用范例详解
2022/07/15 Java/Android