本篇内容介绍了“如何安装harbor作为Docker镜像仓库”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!docker.service 如下
本篇内容介绍了“如何安装harbor作为Docker镜像仓库”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!
[Unit]Description=Docker Application Container EngineDocumentation=https://docs.docker.comAfter=network-online.target firewalld.serviceWants=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.sockExecReload=/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=infinityLimitNPROC=infinityLimitCORE=infinity# Uncomment TasksMax if your systemd version supports it.# Only systemd 226 and above support this version.#TasksMax=infinityTimeoutStartSec=0# set delegate yes so that systemd does not reset the cgroups of docker containersDelegate=yes# kill only the docker process, not all processes in the cgroupKillMode=process# restart the docker process if it exits prematurelyRestart=on-failureStartLimitBurst=3StartLimitInterval=60s[Install]WantedBy=multi-user.target
tar -zxvf docker-20.10.9.tgz cp docker/* /usr/bin/
mv docker.service /usr/lib/systemd/system/
systemctl daemon-reload systemctl enable docker systemctl start docker systemctl status docker
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
docker-compose -v
Harbor是一个开源的可信云本地注册项目,用于存储、签名和扫描内容。Harbor通过添加用户通常需要的功能(如安全性、身份和管理)扩展了开源Docker发行版。使注册表更接近构建和运行环境可以提高图像传输效率。
tar xvf harbor-offline-installer-v1.9.3.tgz
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登录密码,根据情况修改
Harbor的默认安装使用HTTP—因此,您需要将选项“-unsecure reGIStry”添加到客户端的Docker守护进程,并重新启动Docker服务。
vi /etc/docker/daemon.json {"insecure-registries" : [ "192.168.4.xxx" ] }
重启docker
service docker restart
./install.sh
“如何安装harbor作为docker镜像仓库”的内容就介绍到这里了,感谢大家的阅读。如果想了解更多行业相关的知识可以关注编程网网站,小编将为大家输出更多高质量的实用文章!
--结束END--
本文标题: 如何安装harbor作为docker镜像仓库
本文链接: https://www.lsjlt.com/news/340841.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
2024-05-02
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0