No description, website, or topics provided.
Branch: master
Clone or download
larsks fix issues with whiteout handling
there were two issues in how undocker was handling whiteouts.  When
using the `-o <output directory>` option, that path prefix was not
being applied when processing whiteouts so undocker was for the most
part ignoring the whiteouts.

Undocker was always calling `os.unlink` in order to remove filesystem
paths, which fails when the path being removed is a directory.

Closes #17.
Latest commit c951f02 Feb 9, 2018
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore ignore some things Mar 13, 2015 add some docs: re JSON data in the images Feb 13, 2015
LICENSE.txt prep for pypi Feb 17, 2016 prep for pypi Feb 17, 2016 adopt GPLv3 license Jul 6, 2015
setup.cfg prep for pypi Feb 17, 2016 prep for pypi Feb 17, 2016 fix issues with whiteout handling Feb 9, 2018

Unpacks a Docker image.


usage: [-h] [--ignore-errors] [--output OUTPUT] [--verbose]
                   [--debug] [--list] [--layer LAYER]

positional arguments:

optional arguments:
  -h, --help            show this help message and exit
  --ignore-errors, -i   Ignore OS errors when extracting files
  --output OUTPUT, -o OUTPUT
                        Output directory (defaults to ".")
  --verbose, -v
  --debug, -d
  --list, --ls          List layers in an image
  --layer LAYER, -l LAYER
                        Extract only the specified layer


Extract an entire image:

$ docker save busybox | undocker -i -o busybox busybox

The -i option is necessary here because I am not running as root, and the extract operation will fail when it attempts to create device nodes.

List the layers in an image:

$ docker save busybox | undocker --list

Extract only specific layers:

$ docker save busybox |
  undocker -o busybox -v \
  -l 4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125 \
INFO:undocker:extracting image busybox (4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125)
INFO:undocker:extracting layer 4986bf8c15363d1c5d15512d5266f8777bfba4974ac56e3270e7760f6f0a8125


undocker -- a tool for decomposing Docker images
Copyright (C) 2015 Lars Kellogg-Stedman

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see