Giter Club home page Giter Club logo

compact's Introduction

compact

容器镜像压缩工具 Docker image compact tool

容器名称:

zcm-compact

使用方法:

1.解压操作
sh zcm-compact.sh extract new_directory_name

请找一个有足够空间的目录,如“/zpaas/zcm/compact”作为专用的解压缩路径,
第一次使用时,将zcm-compact.sh放入其中。
每次要解压时,在此路径中创建一个新目录,如“20190912”,
将images.squashfs,restore_layers.sh放入新目录,
然后你可以执行命令来解压镜像。

例如,
sh zcm-compact.sh extract 20190912

   /zpaas/zcm/compact/
      ├────zcm-compact.sh
      └────20190912
                    ├────images.squashfs
                    └────restore_layers.sh

2.压缩操作
sh zcm-compact.sh compact new_directory_name/filename.lst

请先将镜像拉到本地,编辑镜像名形成一个列表保存为文件,以“.lst”为后缀名,例如“201909.lst”。
找一个有足够空间的目录,比如“/zpaas/zcm/compact”,作为专用的解压缩路径,
第一次使用时,将zcm-compact.sh放入其中。
每次要压缩时,在这个目录下创建一个像“20190913”这样的新目录,并将列表文件放入新目录,
然后你可以执行命令来压缩镜像。
执行后,在目录“20190913”下会根据当前时间自动创建一个目录,如“Image_1909130930”,
压缩文件“images.squashfs”、“restore_layers.sh”将在“Image_1909130930”下生成。
例如,
sh zcm-compact.sh compact 20190913/201909.lst

   /zpaas/zcm/compact/
      ├──── zcm-compact.sh
      └──── 20190913
                    ├────201909.lst
                    └────IMAGE_1909130930
                               ├─images.squashfs
                               └────restore_layers.sh

compact's People

Contributors

zangping avatar

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.