docker-11-Rancker来了

  1. 搭建企业镜像私服Harbor
  2. 安装Harbor
  3. Docker配置私服
  4. 公开私有
  5. 上传下载
    1. 上传私有nateshao-private

搭建企业镜像私服Harbor

安装Harbor1

2

1,准备docker-compose

1
2
3
4
# 改文件名
[root@zsh ~]# mv docker-compose-Linux-x86_64 /usr/local/bin/docker-compose
# 添加权限
[root@zsh ~]# chmod +x //usr/local/bin/docker-compose

查看版本

1
2
3
4
5
6
[root@zsh ~]# docker-compose version
docker-compose version 1.25.0, build 0a186604
docker-py version: 4.1.0
CPython version: 3.7.4
OpenSSL version: OpenSSL 1.1.0l 10 Sep 2019
[root@zsh ~]#
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19


# 前提条件

已安装docker-compose

# 解压harbor 离线包
tar -zxvf harbor-offline-installer-v1.9.3.tgz


# 修改 harbor.yml hostname配置
vim harbor.yml


# 执行安装
sh install.sh

账号:admin
密码:Harbor12345

修改ip

成功

55555

Docker配置私服

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24


# 修改 docker 接入私服

vim /etc/docker/daemon.json

"insecure-registries" : ["172.17.0.130"]



# 重启docker

systemctl restart docker
[root@VM_0_16_centos harbor]# docker-compose start
Starting log ... done
Starting registry ... done
Starting registryctl ... done
Starting postgresql ... done
Starting portal ... done
Starting redis ... done
Starting core ... done
Starting jobservice ... done
Starting proxy ... done
[root@VM_0_16_centos harbor]#

公开私有

上传下载

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 登录
[root@VM_0_16_centos harbor]# docker login 122.51.23.194
Username: admin
Password: Harbor12345
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-store

Login Succeeded
[root@VM_0_16_centos harbor]#

#上传至公开库
docker tag nginx:latest 122.51.23.194/nateshao-pub/nginx:0.0.1

docker push 122.51.23.194/nateshao-pub/nginx:0.0.1

#上传至私有库
[root@VM_0_16_centos harbor]# docker tag mysql 122.51.23.194/nateshao-private/mysql:0.0.1
[root@VM_0_16_centos harbor]# docker push 122.51.23.194/nateshao-private/mysql:0.0.1
The push refers to repository [122.51.23.194/nateshao-private/mysql]

21

上传私有nateshao-private

视频


转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 1210331079@qq.com

💰

Title:docker-11-Rancker来了

Count:331

Author:千 羽

Created At:2020-08-17, 23:34:15

Updated At:2020-08-30, 14:10:09

Url:https://nateshao.github.io/2020/08/17/docker-11-Rancher%E6%9D%A5%E4%BA%86/

Copyright: 'Attribution-non-commercial-shared in the same way 4.0' Reprint please keep the original link and author.

×

donation.headline

// 底部音乐
//右上角Github图标