Harbor deploy a private warehouse Mirror
understanding:
Harbor Enterprise Registry is a server for storing and distributing Docker image.
Deployment environment:
- CentOS7
- Python2.7.5
- Docker CE18.09.6
- Docker Compose1.32.2
- Harbor1.7.1
installation:
- Installation Components
yum -y install wget python-devel libevent-devel epel-release python-pip gcc gcc-c++ xz-devel
- Installation Dcoker CE
yum install -y yum-utils device-mapper-persistent-data lvm2 yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo yum -y install docker-ce
- Installation Dcoker compose
curl -L "https://github.com/docker/compose/releases/download/1.23.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose
- Installation Harbor
cd /usr/local/src HTTPS wget: //storage.googleapis.com/harbor-releases/release-1.7.0/harbor-offline-installer-v1.7.1 .tgz # unzipped to the directory / usr / local / Harbor tar -xvf-offline - The Harbor installer-v1.7.1.tgz -C / usr / local /
- Edit Profile
cd /usr/local/harbor/ we harbor.cfg ''' hostname = test.harbor.com project_creation_restriction = adminonly '''
- install service
./install.sh
- Start Service
docker-compose start
- Configuring HTTPS
# Create a directory mkdir -p /data/cert/ # Generate ca certificates and signatures OpenSSL genrsa -out /data/cert/ca.key 2048 OpenSSL REQ -x509--nodes -new -key /data/cert/ca.key -subj " /CN=test.harbor.com " - 5000 -out Days / the Data / CERT / ca.crt # edit the configuration file vi harbor.cfg ui_url_protocol = HTTPS # start the service ./ PREPARE docker-compose down docker-compose up -d
- test
windows:
# Configuration file location C: \ Windows \ System32 \ the Drivers \ etc \ hosts # add a line ip servername
ubuntu:
# Configuration file location / etc / hosts # add a line ip servername
- access
# Access in the browser https://test.harbor.com/ Default Username: admin Default password: Harbor12345