Giter VIP home page Giter VIP logo

docker_registry_clean's Introduction

docker_registry_clean

author = 'Kuhn'

company = 'Asiainfo'

qq:170478063

清理docker私有仓库

目前支持v1版本的docker registry

当前功能:

1.清理指定image:tag

2.当image所有的tag均删除后,会尝试删除该image历史冗余的所有镜像

3.清理某image下所有无用的层

操作方法:

1.下载本工具包docker_registry_clean

2.将docker_registry_clean目录放在docker私有仓库所在主机的某个目录下(需要有操作仓库目录的权限)

3.执行如下命令

删除指定镜像指定tag:

python delete-image.py  {registry_path}  {image_name:image_tag}

删除某镜像无用层:

python delete-image.py  {registry_path}  {image_name}    

----------{registry_path}是仓库所在目录,其实就是启动仓库的时候指定的目录(-v /home/registry-storage:/home/registry-storage -w /home/registry-storage) 默认V1版本的仓库根目录下有这两个目录:images  repositories

----------{image_name:image_tag}  镜像:tag

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.