Detailed tutorial on building harbor, building harbor
Environment requirements:
Hardware:
Cpu ≥ 2 cores, 4 cores recommended
Memory> = 4G, 8G recommended
Disk> = 40 GB, recommended 160
Software:
Python >=2.7
Docker engine >=1.10
Docker compose> = 1.6.0
The latest version of openssl is recommended (check openssl version: openssl version)
Network:
443: https request
4443: Link to the docker trust service. When Notary is enable, You need to enable this port (Notary, a project related to docker security, notary aims to ensure the interaction between the server and client using a trusted connection, which is used to solve the security of content publishing on the Internet. This project is not limited to container applications. In container scenarios, it can provide better support for image source authentication, Image Integrity, and other security requirements .)
80: http request
Wget https://github.com/vmware/harbor/releases/download/v1.2.0/harbor-online-installer-v1.2.0.tgz
Tar zxvf harbor-online-installer-v1.2.0.tgz
Edit the configuration file vi harbor. cfg:
Change the hostname to 10.10.37.18.
./Install. sh
Prompt after successful installation:
---- Harbor has been installed and started successfully .----
Access http: // 10.10.37.18. The default user name/password is admin/Harbor12345.
Change docker client, vi/etc/default/docker,
DOCKER_OPTS = "-- insecure-registry = 10.10.37.18 -- iptables = false -- bridge = br0 -- ip-masq = false"
Vi Dockerfile, add
FROM centos: centos7.1.1503
Env tz "Asia/Shanghai"
Create an image
Docker build-t 10.10.37.18/library/centos7.1: 0.1.
Push the image to harbor (if it is not a self-created image, remember to run docker tags to tag the image first)
Docker push 10.10.37.18/library/centos7.1: 0.1
Test deletion, on the web page
Test pull
Docker pull 10.10.37.18/library/centos7.1: 0.1