Harbor私有仓库部署(最新)

Harbor私有仓库部署(最新)

[root@K8s-Master ~]#yum install wget -y
[root@K8s-Master ~]#wget https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo -O /etc/yum.repos.d/docker-ce.repo #docker-ce国内yum源
[root@K8s-Master ~]#yum -y install docker-ce
[root@K8s-Master ~]#systemctl enable docker && systemctl start docker
[root@K8s-Master ~]# wget https://storage.googleapis.com/harbor-releases/release-1.8.0/harbor-offline-installer-v1.8.0.tgz                   #下载Harbor
[root@K8s-Master ~]# tar xf harbor-offline-installer-v1.8.0.tgz 
[root@K8s-Master ~]# cd harbor/
[root@K8s-Master harbor]# ls
harbor.v1.8.0.tar.gz  harbor.yml  install.sh  LICENSE  prepare[root@K8s-Master ~]# wget https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)                           #下载docker-compose
[root@K8s-Master ~]# mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
[root@K8s-Master ~]# chmod +x /usr/local/bin/docker-compose[root@K8s-Master harbor]# bash install.sh #安装harbor
[root@K8s-Master harbor]# docker-compose ps#上传镜像
[root@k8s-node2 ~]# docker tag nginx:latest 192.168.66.11/project/nginx:test
[root@k8s-node2 ~]# docker images | grep nginx
nginx                                                latest    605c77e624dd   4 months ago    141MB
192.168.66.11/project/nginx                          test      605c77e624dd   4 months ago    141MB
[root@k8s-node2 ~]# cat /etc/docker/daemon.json 
{"registry-mirrors": ["https://7w5yqlyj.mirror.aliyuncs.com"],"insecure-registries": ["http://192.168.66.11"],"graph": "/data/dockerdata/docker"  
}
[root@k8s-node2 ~]# systemctl daemon-reload  &&systemctl restart docker
[root@k8s-node2 ~]# docker login http://192.168.66.11
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-storeLogin Succeeded
[root@k8s-node2 ~]# docker push 192.168.66.11/project/nginx:test
The push refers to repository [192.168.66.11/project/nginx]
d874fd2bc83b: Preparing 
32ce5f6a5106: Preparing 
f1db227348d0: Preparing 
b8d6e692a25e: Preparing 
e379e8aedd4d: Preparing 
2edcec3590a4: Waiting 
denied: requested access to the resource is denied  #此时是因为在Harbor没有创建project项目所致
#以下为创建项目后的结果
[root@k8s-node2 ~]# docker push 192.168.66.11/project/nginx:test
The push refers to repository [192.168.66.11/project/nginx]
d874fd2bc83b: Pushed 
32ce5f6a5106: Pushed 
f1db227348d0: Pushed 
b8d6e692a25e: Pushed 
e379e8aedd4d: Pushed 
2edcec3590a4: Pushed 
test: digest: sha256:ee89b00528ff4f02f2405e4ee221743ebc3f8e8dd0bfd5c4c20a2fa2aaa7ede3 size: 1570

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/548911.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

K8S使用habor作为私有仓库

K8S使用habor作为私有仓库 1、修改每个node上的docker认证仓库 # 将每个node节点上的docker同样需要配置可信任仓库 vi /etc/docker/daemon.json #修改为 { "registry-mirrors": ["https://b9pmyelo.mirror.aliyuncs.com"], "insecure-registries&qu…

桌面虚拟化之用户行为审计

桌面虚拟化通过统一的远程访问协议(如PCoIP、RDP)来进行桌面的远程访问。这样的好处是显而易见的。因为只提供一种方式进行接入,所以IT人员只要做好一条防线的保护,用户的操作及行为都可以尽收眼底了。这就好比古城堡一样&#xf…

K8s集群离线部署

K8s集群离线部署(最新版) 1、部署k8s的两种方式: 本次实验采用的部署Kubernetes方式: kubeadm Kubeadm是一个K8s部署工具,提供kubeadm init和kubeadm join,用于快速部署Kubernetes集群。 2、环境准备 …

渲染优化 lock unlock

昨天参加了公司组织的nvdia的培训,讲了一些关于D3D的优化和可能的瓶颈所在,具体的条目就不说了,这里说一些关于资源的Lock和Unlock,以及我在GL下的测试。 老师讲到向Draw*这类函数是将其指令放入指令队列,带填满后或者…

linux 共享盘cifs、nfs

linux 共享盘cifs、nfs 1、安装并启用nfs服务 #安装nfs并启用相关服务 yum install -y rpcbind nfs-utils systemctl start rpcbind systemctl start nfs-server#创建本地nfs文件夹 mkdir -p /data/nfs/d{1..4} [rootlocalhost ~]# vim /etc/exports /data/nfs/d1 *(rw,sync…

选出你最喜欢的Linux操作系统吧

做一份调查,你最喜欢的LINUX版本是什么?有何优点? 为什么使用它?说出一二个优点哈。Redhat/Fedora SUSE Debian Mandriva Ubuntu RedFlag Asianux CentOS Gentoo Others希望大家能发表自己的意见~~说出各自的优点。转载于:https:…

linux 运维最常用命令大全

linux 运维最常用命令大全 1、帮助命令 man:全拼manual,用来查看系统中自带的各种参考手册。 help:用于显示shell内部命令的帮助信息。 2、文件和目录操作命令 ls:全拼list,列出目录的内容及其内容属性信息。 cd…

PHP学习——定界符格式引起的错误

下面是一个错误的代码,能看出哪里出错了么??对于我这个初学者什么都是蒙蒙懂的,真的无从下手,但是真的要自己尝试了才知道哪里错了,书和教程都不会告诉我哪里错了 错误代码:Parse error: syntax…

K8S初学命令

K8S初学命令 1、pod常用命令 作用命令查看pod节点kubectl get pod查看所有pod节点kubectl get pods -A查看pod节点详情kubectl get pod -o wide查看所有名称空间下的podkubectl get pod --all-namespaces根据yaml文件创建podkubectl apply -f <文件名称>根据yaml文件删…

SBO错误提示总帐科目缺失解决方法

检查&#xff1a; 管理-定义-财务-总帐科目确认的收入标签中的应收和收入科目是否设置&#xff1b; 库存标签中的总帐科目设置是否完全&#xff1b; 如果没问题再检查业务伙伴主数据的应收科目是否设置&#xff1b; 如果有舍入还要检查总帐科目确认中的舍入科目是否设置。 如果…

k8s常用命令总结

k8s常用命令 #查看所有namespace的pods运行情况 kubectl get pods --all-namespaces #查看具体pods&#xff0c;记得后边跟namespace名字哦 kubectl get pods kubernetes-dashboard-76479d66bb-nj8wr -n kube-system # 查看pods具体信息 kubectl get pods -o wide kubernete…

iphone开发之私有库private frameworks

https://github.com/kennytm/iphone-private-frameworks Headers for private frameworks or undocumented interfaces of iPhoneOS 3.x or before (4.x is not supported yet). class dump出来的头文件&#xff0c;包含apple没有开放的json库&#xff0c;SpringBoard&#xf…

sed修改网卡配置

sed -i -e s/192.168.10.10/192.168.66.10/ -e s/192.168.10.1/192.168.66.1/ /etc/sysconfig/network-script/ifcfg-ens33

iphone开发之C++和Objective-C混编

C和Objective-C混编&#xff08;官方文档翻译&#xff09; 原文网址&#xff1a; http://developer.apple.com/iphone/library/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocCPlusPlus.html Using C With Objective-C 苹果的Objective-C编译器允许用户在同一个源文件…

sed多个替换选项

sed -i -e s/192.168.10.10/192.168.66.10/ -e s/192.168.10.1/192.168.66.1/ /etc/sysconfig/network-script/ifcfg-ens33sed -i -e s/192.168.10.10/192.168.66.10/&#xff1b; s/192.168.10.1/192.168.66.1/ /etc/sysconfig/network-script/ifcfg-ens33

PHP之数组学习

对于网页编程来说&#xff0c;最重要的就是存取和读写数据了。存储方式可能有很多种&#xff0c;可以是字符串、数组、文件的形式等&#xff0c;今天学习了数组&#xff0c;可以说是PHP的数据应用中较重要的一种方式。PHP的数组函数众多&#xff0c;下面是我学习的小结&#xf…

centos 彻底卸载软件包(含依赖)并解决安装冲突包问题

centos 彻底卸载软件包&#xff08;含依赖&#xff09;并解决安装冲突包问题 1、查看yum操作事务 [rootlocalhost ~]# yum history list 或 yum history Loading "fastestmirror" plugin Config time: 0.007 Yum version: 3.4.3 ID | Login user …

mysql Error 1045(28000)

2019独角兽企业重金招聘Python工程师标准>>> 在windows操作系统安装mysql数据库&#xff0c;碰到Error 1045(28000) Access Denied for user rootlocalhost (Using password:NO)错误时&#xff0c;你需要重新设置密码。 具体方法是&#xff1a; 1.先在安装目录找到m…

linux将上一条命令的结果作为下一条命令的参数

linux将上一条命令的结果作为下一条命令的参数 1、xargs [rootlocalhost test]# touch test{1..10}.txt [rootlocalhost test]# ls test10.txt test1.txt test2.txt test3.txt test4.txt test5.txt test6.txt test7.txt test8.txt test9.txt [rootlocalhost test]# …