Author image Cameron Tauxe
and 1 contributors


Docker::Construct - Construct the filesystem of an exported docker image.


This is the backend module for the docker-construct command-line tool. For basic usage, refer to its documentation instead.

    use Docker::Construct qw(construct);

    # Minimal usage
    construct('path/to/image.tar', 'path/to/output/dir');

    # With options
        image           => 'path/to/image.tar',
        dir             => 'path/to/output.dir',
        quiet           => 1,
        include_config  => 1


Reconstruct the the filesystem of the specified tarball (output from the docker save command) inside the specified directory. If only two arguments are given, they are interpreted as the paths to the input tarball and output directory respectively. If more arguments are given, the arguments are interpreted as a hash. A hash allows you specify additional options and the input tarball and output directory are specified with the image and dir keys respectively.


  • image (required)

    Path to the input tarball

  • dir (required)

    Path to the output directory (must exist already)

  • quiet

    If true, progress will not be reported on stderr.

  • include_config

    If true, include the image's config json file as config.json in the root of the extracted filesystem.


Cameron Tauxe, <camerontauxe at>


This software is copyright (c) 2020 by Cameron Tauxe.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.