docker镜像仓库-harbor

公有仓库:docker hub

私有仓库:registry

建议生产仓库:harbor

https://blog.csdn.net/qq_24095941/article/details/86063684

Harbor

  这是VMWare公司提供的一个docker私有仓库构建程序,功能非常强大.

    1. 支持多租户签名和认证

    2. 支持安全扫描和风险分析

    3. 这次日志审计

    4. 基于角色的访问控制

    5. 支持可扩展的API和GUI

    6. Image replication between instances

    7. 国际化做的很好(目前仅支持英文和中文)

[root@localhost ~]# cd harbor/
[root@localhost harbor]# ls
common.sh  harbor.v1.10.4.tar.gz  harbor.yml  install.sh  LICENSE  prepare
[root@localhost harbor]# vi harbor.yml 

修改hostname,注释https:

# The IP address or hostname to access admin UI and registry service.
# DO NOT use localhost or 127.0.0.1, because Harbor needs to be accessed by external clients.
hostname: 192.168.1.102

# http related config
http:
  # port for http, default is 80. If https enabled, this port will redirect to https port
  port: 80

# https related config
#https:
  # https port for harbor, default is 443
  #port: 443
  # The path of cert and key files for nginx
  #certificate: /your/certificate/path
  #private_key: /your/private/key/path


# Uncomment external_url if you want to enable external proxy
# And when it enabled the hostname will no longer used
# external_url: https://reg.mydomain.com:8433

# The initial password of Harbor admin
# It only works in first time to install harbor
# Remember Change the admin password from UI after launching Harbor.
harbor_admin_password: Harbor12345

启动:./install.sh

访问 ip+端口,输入账户密码(配置文件上有密码):

由于harbor配置的是http访问,docker是https,所以所以需要修改 docker 配置,将信任的库的地址写上

修改文件 /etc/docker/daemon.json

{
  "insecure-registries": [
    "192.168.1.102"
  ]
}

systemctl restart docker

docker tag nginx:latest 192.168.1.102/test/nginx:latest

docker push 192.168.1.102/test/nginx:latest

上传镜像成功!

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值