harbor简述
Harbor为存放镜像的私有仓库,可以部署在任何支持Docker的Linux发行版本上,它的核心组件是registry,它支持多种功能,图形化界面管理、多用户权限、角色管理机制、安全机制等
Harbor安装部署
安装docker
[root@harbor opt]
[root@harbor opt]
[root@harbor yum.repos.d]
已加载插件:fastestmirror, langpacks
adding repo from: https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
{
"log-driver": "json-file",
"log-opts": {
"max-size": "100m"
},
"insecure-registries": [
"192.168.118.44"
],
"storage-driver": "overlay2",
"storage-opts": [
"overlay2.override_kernel_check=true"
]
}
~
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
安装docker-compose
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
[root@harbor yum.repos.d]
docker-compose version 1.25.1, build a82fef07
安装harbor
[root@harbor opt]
[root@harbor opt]
hostname: 192.168.118.44
[root@harbor opt]
[root@harbor harbor]
harbor.v1.9.3.tar.gz harbor.yml install.sh LICENSE prepare
[root@harbor harbor]
- 新建项目
- 推送镜像到harbor仓库
[root@harbor harbor]
[root@harbor harbor]
REPOSITORY TAG IMAGE ID CREATED SIZE
nginx latest ad4c705f24d3 2 days ago 133MB
[root@harbor harbor]
[root@harbor harbor]
REPOSITORY TAG IMAGE ID CREATED SIZE
192.168.118.44/whd/nginx-01 latest ad4c705f24d3 2 days ago 133MB
nginx latest ad4c705f24d3 2 days ago 133MB
[root@harbor harbor]
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
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/
Login Succeeded
[root@harbor harbor]
Using default tag: latest
The push refers to repository [192.168.118.44/whd/nginx-01]
fac15b2caa0c: Pushed
f8bf5746ac5a: Pushed
d11eedadbd34: Pushed
797e583d8c50: Pushed
bf9ce92e8516: Pushed
d000633a5681: Pushed
latest: digest: sha256:6fe11397c34b973f3c957f0da22b09b7f11a4802e1db47aef54c29e2813cc125 size: 1570
- 刷新harbor网页查看
|