- 浏览: 2557344 次
- 性别:
- 来自: 成都
文章分类
最新评论
-
nation:
你好,在部署Mesos+Spark的运行环境时,出现一个现象, ...
Spark(4)Deal with Mesos -
sillycat:
AMAZON Relatedhttps://www.godad ...
AMAZON API Gateway(2)Client Side SSL with NGINX -
sillycat:
sudo usermod -aG docker ec2-use ...
Docker and VirtualBox(1)Set up Shared Disk for Virtual Box -
sillycat:
Every Half an Hour30 * * * * /u ...
Build Home NAS(3)Data Redundancy -
sillycat:
3 List the Cron Job I Have>c ...
Build Home NAS(3)Data Redundancy
Private Docker Registry Harbor(1)Installation and Configuration
Docker register 2
https://docs.docker.com/registry/deploying/
https://hub.docker.com/r/konradkleine/docker-registry-frontend/
https://docs.docker.com/registry/
Harbor is using registry v2 under line.
http://www.ywnds.com/?p=7958
Installation
http://blog.51cto.com/slitobo/2323332
Check version on my Ubuntu
> docker --version
Docker version 18.06.1-ce, build e68fc7a
Make Sure docker-compose is there
> sudo apt install docker-compose
> docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.15rc1
OpenSSL version: OpenSSL 1.1.0g 2 Nov 2017
Find the offline release version from here https://github.com/goharbor/harbor/releases
> wget https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1.tgz
Unzip the file
> tar -xf harbor-offline-installer-v1.7.1.tgz
Move to work directory
> mv harbor ~/tool/harbor-1.7.1
> sudo ln -s /home/ubuntu/tool/harbor-1.7.1 /opt/harbor-1.7.1
> sudo ln -s /opt/harbor-1.7.1 /opt/harbor
Changed some configurations in harbor.cfg
hostname = 52.13.38.xxx
ui_url_protocol = http
harbor_admin_password = xxxxxxxx
Load the Configuration
> sudo ./prepare
Install
> sudo ./install.sh
After that it says successfully installed, and we can visit
http://ubuntu-master
If you do docker ps, you can see a lot of docker applications running
51d4052c3aee goharbor/harbor-jobservice:v1.7.1 "/harbor/start.sh" 57 seconds ago Up 56 seconds harbor-jobservice
dc549f7ab2a4 goharbor/nginx-photon:v1.7.1 "nginx -g 'daemon of…" 57 seconds ago Up 56 seconds (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp nginx
6cc8885741ab goharbor/harbor-portal:v1.7.1 "nginx -g 'daemon of…" 57 seconds ago Up 57 seconds (healthy) 80/tcp harbor-portal
64201aa99eb9 goharbor/harbor-core:v1.7.1 "/harbor/start.sh" 58 seconds ago Up 57 seconds (healthy) harbor-core
d0f34ab01c10 goharbor/registry-photon:v2.6.2-v1.7.1 "/entrypoint.sh /etc…" 59 seconds ago Up 58 seconds (healthy) 5000/tcp registry
972d20c16c94 goharbor/redis-photon:v1.7.1 "docker-entrypoint.s…" 59 seconds ago Up 57 seconds 6379/tcp redis
7feea19cbf09 goharbor/harbor-db:v1.7.1 "/entrypoint.sh post…" 59 seconds ago Up 57 seconds (healthy) 5432/tcp harbor-db
632ad580657f goharbor/harbor-adminserver:v1.7.1 "/harbor/start.sh" 59 seconds ago Up 58 seconds (healthy) harbor-adminserver
1b56d23e9b30 goharbor/harbor-registryctl:v1.7.1 "/harbor/start.sh" 59 seconds ago Up 58 seconds (healthy) registryctl
e8d9cb51673e goharbor/harbor-log:v1.7.1 "/bin/sh -c /usr/loc…" About a minute ago Up 59 seconds (health: starting) 127.0.0.1:1514->10514/tcp harbor-log
You can use your username and password to login that server.
Configure the Docker Insecure Service on MAC, open the docker tool on MAC
[References] —> [Daemon] —> [Insecure registries] Add my website there [ubuntu-master] —> [Apply & Restart]
> docker login ubuntu-master
Username: yiyikang
Password:
Login Succeeded
Get the latest ubuntu
> docker pull ubuntu
Tag the image
> docker tag ubuntu ubuntu-master/library/ubuntu:v1
For example, when I build my image
Successfully tagged ubuntu-master/library:kiko-jenkins-generic-jdk10
Tag again
Successfully tagged www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
I changed my domain to www.ubuntu-master.com, so redo all these steps and login again
> docker login www.ubuntu-master.com
This time it success
> docker push www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
Then we can see the docker image in UI and manage that.
Clean my local images
> docker images
> docker rmi redis:latest
Clean up the <none> tag ones
> docker images | grep none | awk '{ print $3; }' | xargs docker rmi
Command to delete all images
> docker rmi -f $(docker images -a -q)
Pull the images
> docker pull www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
How to stop the Service
> sudo docker-compose down -v
How to start the Service
> sudo docker-compose up -d
Some details are here
https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md
How to Change Config
> sudo docker-compose down -v
> sudo ./prepare
> sudo docker-compose up -d
Clean database
> rm -r /data/database
Clean the images
> rm -r /data/registry
Docker Compose
Running multiple docker containers at one single command
https://www.jianshu.com/p/0793f62af9df
https://www.jianshu.com/p/13de6b266cf8
Deal with the Ports
By default, Harbor listens on port 80 and 443 for admin portal and docker commands.
I can change the PORT in compose
> vi docker-compose.yml
I change the port from 80 to 49002
Then I change the configuration
> vi harbor.cfg
hostname = www.ubuntu-master.com:49002
Add the Host to our list in Insecure registries
www.ubuntu-master.com:49002
> docker login www.ubuntu-master.com:49002
Tag my new Image again
Successfully tagged www.ubuntu-master.com:49002/library/jenkins-generic-jdk10:1.0
Push again
> docker push www.ubuntu-master.com:49002/library/jenkins-generic-jdk10:1.0
References:
https://alexanderzeitler.com/articles/deploying-a-private-secured-docker-registry-within-15-minutes/
https://github.com/goharbor/harbor
https://dongbo0737.github.io/2017/06/29/harbor-install/
https://www.jianshu.com/p/cf16763942d5
http://blog.51cto.com/slitobo/2323332
http://www.ywnds.com/?p=7958
https://blog.csdn.net/yjk13703623757/article/details/79962616
https://blog.csdn.net/fighterandknight/article/details/72518042
https://ivanzz1001.github.io/records/post/docker/2018/04/11/docker-harbor-uage
Docker register 2
https://docs.docker.com/registry/deploying/
https://hub.docker.com/r/konradkleine/docker-registry-frontend/
https://docs.docker.com/registry/
Harbor is using registry v2 under line.
http://www.ywnds.com/?p=7958
Installation
http://blog.51cto.com/slitobo/2323332
Check version on my Ubuntu
> docker --version
Docker version 18.06.1-ce, build e68fc7a
Make Sure docker-compose is there
> sudo apt install docker-compose
> docker-compose version
docker-compose version 1.17.1, build unknown
docker-py version: 2.5.1
CPython version: 2.7.15rc1
OpenSSL version: OpenSSL 1.1.0g 2 Nov 2017
Find the offline release version from here https://github.com/goharbor/harbor/releases
> wget https://storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1.tgz
Unzip the file
> tar -xf harbor-offline-installer-v1.7.1.tgz
Move to work directory
> mv harbor ~/tool/harbor-1.7.1
> sudo ln -s /home/ubuntu/tool/harbor-1.7.1 /opt/harbor-1.7.1
> sudo ln -s /opt/harbor-1.7.1 /opt/harbor
Changed some configurations in harbor.cfg
hostname = 52.13.38.xxx
ui_url_protocol = http
harbor_admin_password = xxxxxxxx
Load the Configuration
> sudo ./prepare
Install
> sudo ./install.sh
After that it says successfully installed, and we can visit
http://ubuntu-master
If you do docker ps, you can see a lot of docker applications running
51d4052c3aee goharbor/harbor-jobservice:v1.7.1 "/harbor/start.sh" 57 seconds ago Up 56 seconds harbor-jobservice
dc549f7ab2a4 goharbor/nginx-photon:v1.7.1 "nginx -g 'daemon of…" 57 seconds ago Up 56 seconds (healthy) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:4443->4443/tcp nginx
6cc8885741ab goharbor/harbor-portal:v1.7.1 "nginx -g 'daemon of…" 57 seconds ago Up 57 seconds (healthy) 80/tcp harbor-portal
64201aa99eb9 goharbor/harbor-core:v1.7.1 "/harbor/start.sh" 58 seconds ago Up 57 seconds (healthy) harbor-core
d0f34ab01c10 goharbor/registry-photon:v2.6.2-v1.7.1 "/entrypoint.sh /etc…" 59 seconds ago Up 58 seconds (healthy) 5000/tcp registry
972d20c16c94 goharbor/redis-photon:v1.7.1 "docker-entrypoint.s…" 59 seconds ago Up 57 seconds 6379/tcp redis
7feea19cbf09 goharbor/harbor-db:v1.7.1 "/entrypoint.sh post…" 59 seconds ago Up 57 seconds (healthy) 5432/tcp harbor-db
632ad580657f goharbor/harbor-adminserver:v1.7.1 "/harbor/start.sh" 59 seconds ago Up 58 seconds (healthy) harbor-adminserver
1b56d23e9b30 goharbor/harbor-registryctl:v1.7.1 "/harbor/start.sh" 59 seconds ago Up 58 seconds (healthy) registryctl
e8d9cb51673e goharbor/harbor-log:v1.7.1 "/bin/sh -c /usr/loc…" About a minute ago Up 59 seconds (health: starting) 127.0.0.1:1514->10514/tcp harbor-log
You can use your username and password to login that server.
Configure the Docker Insecure Service on MAC, open the docker tool on MAC
[References] —> [Daemon] —> [Insecure registries] Add my website there [ubuntu-master] —> [Apply & Restart]
> docker login ubuntu-master
Username: yiyikang
Password:
Login Succeeded
Get the latest ubuntu
> docker pull ubuntu
Tag the image
> docker tag ubuntu ubuntu-master/library/ubuntu:v1
For example, when I build my image
Successfully tagged ubuntu-master/library:kiko-jenkins-generic-jdk10
Tag again
Successfully tagged www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
I changed my domain to www.ubuntu-master.com, so redo all these steps and login again
> docker login www.ubuntu-master.com
This time it success
> docker push www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
Then we can see the docker image in UI and manage that.
Clean my local images
> docker images
> docker rmi redis:latest
Clean up the <none> tag ones
> docker images | grep none | awk '{ print $3; }' | xargs docker rmi
Command to delete all images
> docker rmi -f $(docker images -a -q)
Pull the images
> docker pull www.ubuntu-master.com/library/jenkins-generic-jdk10:1.0
How to stop the Service
> sudo docker-compose down -v
How to start the Service
> sudo docker-compose up -d
Some details are here
https://github.com/goharbor/harbor/blob/master/docs/installation_guide.md
How to Change Config
> sudo docker-compose down -v
> sudo ./prepare
> sudo docker-compose up -d
Clean database
> rm -r /data/database
Clean the images
> rm -r /data/registry
Docker Compose
Running multiple docker containers at one single command
https://www.jianshu.com/p/0793f62af9df
https://www.jianshu.com/p/13de6b266cf8
Deal with the Ports
By default, Harbor listens on port 80 and 443 for admin portal and docker commands.
I can change the PORT in compose
> vi docker-compose.yml
I change the port from 80 to 49002
Then I change the configuration
> vi harbor.cfg
hostname = www.ubuntu-master.com:49002
Add the Host to our list in Insecure registries
www.ubuntu-master.com:49002
> docker login www.ubuntu-master.com:49002
Tag my new Image again
Successfully tagged www.ubuntu-master.com:49002/library/jenkins-generic-jdk10:1.0
Push again
> docker push www.ubuntu-master.com:49002/library/jenkins-generic-jdk10:1.0
References:
https://alexanderzeitler.com/articles/deploying-a-private-secured-docker-registry-within-15-minutes/
https://github.com/goharbor/harbor
https://dongbo0737.github.io/2017/06/29/harbor-install/
https://www.jianshu.com/p/cf16763942d5
http://blog.51cto.com/slitobo/2323332
http://www.ywnds.com/?p=7958
https://blog.csdn.net/yjk13703623757/article/details/79962616
https://blog.csdn.net/fighterandknight/article/details/72518042
https://ivanzz1001.github.io/records/post/docker/2018/04/11/docker-harbor-uage
发表评论
-
Update Site will come soon
2021-06-02 04:10 1683I am still keep notes my tech n ... -
Stop Update Here
2020-04-28 09:00 320I will stop update here, and mo ... -
NodeJS12 and Zlib
2020-04-01 07:44 482NodeJS12 and Zlib It works as ... -
Docker Swarm 2020(2)Docker Swarm and Portainer
2020-03-31 23:18 373Docker Swarm 2020(2)Docker Swar ... -
Docker Swarm 2020(1)Simply Install and Use Swarm
2020-03-31 07:58 373Docker Swarm 2020(1)Simply Inst ... -
Traefik 2020(1)Introduction and Installation
2020-03-29 13:52 341Traefik 2020(1)Introduction and ... -
Portainer 2020(4)Deploy Nginx and Others
2020-03-20 12:06 433Portainer 2020(4)Deploy Nginx a ... -
Private Registry 2020(1)No auth in registry Nginx AUTH for UI
2020-03-18 00:56 441Private Registry 2020(1)No auth ... -
Docker Compose 2020(1)Installation and Basic
2020-03-15 08:10 379Docker Compose 2020(1)Installat ... -
VPN Server 2020(2)Docker on CentOS in Ubuntu
2020-03-02 08:04 461VPN Server 2020(2)Docker on Cen ... -
Buffer in NodeJS 12 and NodeJS 8
2020-02-25 06:43 391Buffer in NodeJS 12 and NodeJS ... -
NodeJS ENV Similar to JENV and PyENV
2020-02-25 05:14 482NodeJS ENV Similar to JENV and ... -
Prometheus HA 2020(3)AlertManager Cluster
2020-02-24 01:47 428Prometheus HA 2020(3)AlertManag ... -
Serverless with NodeJS and TencentCloud 2020(5)CRON and Settings
2020-02-24 01:46 340Serverless with NodeJS and Tenc ... -
GraphQL 2019(3)Connect to MySQL
2020-02-24 01:48 252GraphQL 2019(3)Connect to MySQL ... -
GraphQL 2019(2)GraphQL and Deploy to Tencent Cloud
2020-02-24 01:48 454GraphQL 2019(2)GraphQL and Depl ... -
GraphQL 2019(1)Apollo Basic
2020-02-19 01:36 330GraphQL 2019(1)Apollo Basic Cl ... -
Serverless with NodeJS and TencentCloud 2020(4)Multiple Handlers and Running wit
2020-02-19 01:19 316Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(3)Build Tree and Traverse Tree
2020-02-19 01:19 323Serverless with NodeJS and Tenc ... -
Serverless with NodeJS and TencentCloud 2020(2)Trigger SCF in SCF
2020-02-19 01:18 298Serverless with NodeJS and Tenc ...
相关推荐
Gitllab+Jenkins+Docker+Harbor 自动化部署流程 一、 版本控制系统 Gitllab Gitllab 是一个基于 web 的 Git 仓库管理系统,提供了一个强大且灵活的平台来管理 Git 项目。 Gitllab 允许用户创建、管理和共享 Git ...
该文档为docker-registry的搭建步骤,由于原生的docker-registry没有提供web界面,需要安装docker-registry-web。本文档包含了所有安装步骤。原创
docker官方镜像仓库registry离线包,使用docker load -i registry.tar
docker-harbor镜像同步详细笔记文档总结
讲述了如何部署registry、registry-web的部署,registry-web是如何管理registry私库的镜像上传、下载的授权、镜像删除、用户管理,提供用户认证的
在Pipeline脚本中,我们还使用了`docker_registry_`变量,该变量用于存储docker-harbor的认证信息,以便在拉取镜像时进行认证。 将docker-harbor镜像部署到k8s集群-node部署时需harbor认证,这是一种常见的云原生...
dockerhub经常访问不了,特地将registry下载到本地,供大家学习使用
docker docker-compose部署harbor
从github上拿到的第三方插件用于删除docker registry上的镜像
讲述了如何部署registry、registry-web的部署,以及registry-web如何管理registry私库的镜像上传、下载的授权、镜像删除、用户管理
Harbor是镜像仓库,那么就应当是存储镜像的,这个可能是大多数接触harbor的人的一个误区,当深入了解以后才发现,镜像的存储harbor使用的是官方的docker registry服务去完成,至于registry是用本地存储或者s3都是...
部署docker仓库harbor的脚本
离线版本docker-harbor部署与注意事项! 1,版本为:1.7.5 2,部署方式:离线 3,部署前需要部署内容,请先阅读Docker-harbor离线部署方案.docx.doc
带有UI的Docker Registry v2 它是什么? 这是一个由docker-compose组成的安装程序,在端口443上运行v2注册表,在端口80上运行nginx,为列出存储库及其标签的最小UI提供服务。 您可以使用docker-compose up -d来启动...
主要介绍了docker registry 镜像同步的相关知识,本文给大家介绍的非常详细,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
docker容器化部署时创建私有仓库时需要用到的registry镜像
docker 制作jdk8基础镜像 配合jib插件使用 也可使用docker hub 自带open jdk 里面包含了Dockerfile 及jdk jre 推送到自定义docker registry 配合jib插件maven 配置使用方式:${docker registry url}/oracle-jre-8u...