Skip to main content

extract and flatten Docker image layers

Project description

Copyright © 2014-2015 Matt Bogosian (@posita).

Please see the accompanying LICENSE (or LICENSE.txt) file for rights and restrictions governing use of this software. All rights not expressly waived or licensed are reserved. If such a file did not accompany this software, then please contact the author before viewing or using this software in any capacity.

dimgx

Latest Version Documentation License Supported Python Versions Supported Python Implementations Development Stage

Status

Build Status Coverage Status

Curious about integrating your project with the above services? Jeff Knupp (@jeffknupp) describes how.

TL;DR

dimgx extracts and flattens Docker image layers:

% dimgx
usage:
dimgx [options] [-l LAYER_SPEC] ... [-t PATH] IMAGE_SPEC
dimgx -h # for help
dimgx: error: too few arguments
% dimgx nifty-box # show layers for "nifty-box[:latest]"
IMAGE TAG               IMAGE ID        PARENT ID       CREATED         LAYER SIZE      VIRTUAL SIZE
-                       3cb35ae859e7    -               16 days ago     125.1 MB        125.1 MB
debian:jessie           41b730702607    3cb35ae859e7    16 days ago     0 Bytes         125.1 MB
-                       60aa72e3db11    41b730702607    7 days ago      0 Bytes         125.1 MB
-                       390ac3ff1e87    60aa72e3db11    6 days ago      1.7 kB          125.1 MB
-                       fec4e64b2b57    390ac3ff1e87    6 days ago      9.4 MB          134.5 MB
-                       51a39b466ad7    fec4e64b2b57    6 days ago      0 Bytes         134.5 MB
nifty-box               0bb92bb75744    51a39b466ad7    4 days ago      1.7 kB          134.5 MB
% dimgx -l 2:4 nifty-box # show only the second through fourth layers
IMAGE TAG               IMAGE ID        PARENT ID       CREATED         LAYER SIZE      VIRTUAL SIZE
debian:jessie           60aa72e3db11    41b730702607    7 days ago      0 Bytes         0 Bytes
-                       390ac3ff1e87    60aa72e3db11    6 days ago      1.7 kB          1.7 kB
-                       fec4e64b2b57    390ac3ff1e87    6 days ago      9.4 MB          9.4 MB
% dimgx -l 2:4 -t nifty.tar nifty-box # extract them
% du -h nifty.tar
9.0M    nifty.tar

dimgx is licensed under the MIT License. Source code is available on GitHub. See the docs for more information.

Issues

dimgx does what I want, so I’m just maintaining it at this point. If you find a bug, or want a feature, please file an issue (if it hasn’t already been filed). If you’re willing and able, consider contributing.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dimgx-0.1.5.tar.gz (13.7 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page