運行docker
docker run --rm -v /nfs1/docker/registry:/var/lib/registry registry:2.5.1 garbage-collect -d /root/registry/gc.ymlbash
1.須要掛在你registry指定的rootdirectoryblog
2.須要將gc.yml配置文件也掛載io
gc.yml文件內容class
version: 0.1 storage: filesystem: rootdirectory: /var/lib/registry