美文网首页
Harbor清理

Harbor清理

作者: ilkkzm | 来源:发表于2019-08-21 17:54 被阅读0次

    Managed to get the mortensrasmussen clean up method to work:

    1 - Disable authentication by editing common/config/registry/config.yml. Comment out
    following section with hash.

    auth:
    token:
    issuer: harbor-token-issuer
    https://docker.iotechsys.com/service/token
    rootcertbundle: /etc/registry/root.crt
    service: harbor-registry

    2 - Edit docker-compose.yml file to expose registry port:

    registry:
    ports:

    • 127.0.0.1:5000:5000

    3 - Stop and restart harbor for changes to take effect

    4 - Run cleanup to remove unused manifests

    docker run --network="host" -it -v /data/registry:/registry -e REGISTRY_URL=http://127.0.0.1:5000 mortensrasmussen/docker-registry-manifest-cleanup
    ** 注意替换 /data/registry 文件夹内容 **

    5 - Run normal cleanup to remove blobs now no longer associated with a manifest

    docker run -it --name gc --rm --volumes-from registry vmware/registry-photon:v2.6.2-v1.4.0 garbage-collect /etc/registry/config.yml

    6 - Back out config/compose file changes and restart harbor

    https://github.com/goharbor/harbor/issues/3344

    相关文章

      网友评论

          本文标题:Harbor清理

          本文链接:https://www.haomeiwen.com/subject/yrbisctx.html