Giter Club home page Giter Club logo

docker-melt's Introduction

Checkout go-docker-melt. It provides more features than docker-melt: go-docker-melt handles multiple images in a single tar archive created via docker save and creates a tar archive that can be imported via docker load.

Build Status

docker-melt is a simple tool to merge all layers of a Docker image into a single layer. It tries to do as little as possible to achieve the result while preserving extended attributes, acl-permissions etc. (Given that your version of tar does indeed support the corresponding flags.). Whiteout files are deleted per default. That is a Dockerfile that contains the following instructions:

RUN truncate --size 200M /somefile
RUN unlink /somefile
RUN echo bla > /somefile

would normally cause an image to have an extra unnecessary 200MB. docker-melt will remove the 200MB file /somefile while preserving the /somefile in the last instruction. This will lead to a smaller final image.

Usage is pretty simple:

docker-melt -i input.tar -o output.tar [-t tmpdir]

Note that in order to preserve all permissions etc. docker-melt should be run as root. The resulting image can then be imported via:

cat output.tar | docker import - newimage

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.