Skip to content

Instantly share code, notes, and snippets.

@hufman
hufman / docker-compile.pl
Last active September 2, 2015 06:18 — forked from mpasternacki/docker-compile.pl
Perl script to build a Docker image from Dockerfile that creates the image in a single layer, without any intermediate images. Needs JSON CPAN module (available as `libjson-perl` Debian/Ubuntu package). Usage: run the script in the directory that contains a Dockerfile.More details in a blog post: http://3ofcoins.net/2013/09/22/flat-docker-images/If
#!/usr/bin/env perl
use feature 'switch';
use strict;
use warnings;
no if $] >= 5.018, warnings => "experimental::smartmatch";
use Data::Dumper;
use File::Basename;
use File::Copy;