Skip to content
This repository has been archived by the owner on May 28, 2022. It is now read-only.

Latest commit

 

History

History
99 lines (68 loc) · 3.89 KB

intro.rst

File metadata and controls

99 lines (68 loc) · 3.89 KB
.. toctree::
    :maxdepth: 3
    :hidden:

Copyright and other protections apply. Please see the accompanying :doc:`LICENSE <LICENSE>` and :doc:`CREDITS <CREDITS>` file(s) for rights and restrictions governing use of this software. All rights not expressly waived or licensed are reserved. If those files are missing or appear to be modified from their originals, then please contact the author before viewing or using this software in any capacity.

Introduction

dimgx (pronounced DIH-muhj-EHKS [1]) is a :doc:`command line tool <cli>` and :doc:`pure Python module <py>` for extracting Docker image layers and flattening them into a single tar archive.

[1]World Book Online (WBO) style pronunciation respelling.

License

dimgx is licensed under the MIT License. See the :doc:`LICENSE <LICENSE>` file for details. Source code is available on GitHub.

Installation

Installation can be performed via pip (which will download and install the latest release):

% pip install dimgx
...

Alternately, you can download the sources (e.g., from GitHub) and run setup.py:

% git clone https://github.com/posita/dimgx
...
% cd dimgx
% python setup.py install
...

Requirements

A modern version of Python is required:

  • cPython (2.7 or 3.3+)
  • PyPy (Python 2.7 or 3.3+ compatible)

Python 2.6 will not work.

dimgx has the following dependencies (which will be installed automatically):

Motivation

I was messing around with Docker and wanted to extract my changes from several distinct image layers without having to get the root image layer. I found that doing so was possible (but cumbersome) using the docker command and other utilities. [2] I wanted to learn more about Docker's Python API and needed a small project to familiarize myself with some other stuff, so this seemed like a perfect opportunity.

[2]There very well might be efficient ways to do this without something like dimgx, but, being a relative newcomer to Docker, I am ignorant of them.

Similar Tools

Check out Jason Wilder's docker-squash, which probably has more features and fewer bugs. For example, dimgx does not provide any reimport functionality. However, dimgx does not require running as root to preserve permissions, nor does it rely on external tools like the tar command.