harbor安裝

wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
yum -y install docker
systemctl start docker
systemctl enable docker
systemctl status docker
docker version
yum -y install certbot libevent-devel gcc libffi-devel python-devel openssl-devel python2-pip
pip install --upgrade pip
pip install -U docker-compose
docker-compose version
wget https://storage.googleapis.com/harbor-releases/release-1.4.0/harbor-offline-installer-v1.4.0.tgz
tar -xf harbor-offline-installer-v1.4.0.tgz
cd harbor
vim harbor.cfg
hostname = ip
harbor_admin_password = 密碼
./install.sh

harbor緩存遠程docker鏡像 execstrat增長insecure-registry配置python

vi /usr/lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd-current \
          --add-runtime docker-runc=/usr/libexec/docker/docker-runc-current \
          --default-runtime=docker-runc \
          --exec-opt native.cgroupdriver=systemd \
          --userland-proxy-path=/usr/libexec/docker/docker-proxy-current \
          --insecure-registry=192.168.6.233 \
          $OPTIONS \
          $DOCKER_STORAGE_OPTIONS \
          $DOCKER_NETWORK_OPTIONS \
          $ADD_REGISTRY \
          $BLOCK_REGISTRY \
          $INSECURE_REGISTRY\
          $REGISTRIES

重啓docker服務redis

systemctl daemon-reload
systemctl restart docker
systemctl status docker

 

關閉harbordocker

docker-compose stop
#docker-compose rm -f

啓動harborvim

docker-compose up -d

登陸私有倉庫帳號api

docker login http://ip:端口

 推一個鏡像到私有倉緩存

docker pull redis
docker tag redis 192.168.6.233/library/redis
docker push 192.168.6.233/library/redis
相關文章
相關標籤/搜索