Smallest Perl build (microperl) in the container made from scratch.
Size : 1.5 Mb
Get ready image from Docker Hub repository:
$ docker pull hosuaby/microperl
To build image locally do:
$ ./build.sh
This command starts builder container, downloads Perl sources from CPAN and builds statically linked microperl
executable. After executable is put into smallest docker container called
scratch
. Name of result image is hosuaby/microperl
.
Try it:
$ docker run --rm hosuaby/microperl -e 'print "Microperl rocks!!!\n"'
Tiny embedded Perl can run on tens and hundreds containers. You can use it to simulate network of connected devices, captors, nodes, social network users, etc.
Perl is wroten in C
. The sources that provided by CPAN rarely build without
do some small fixes. I wrote the patch for version 5.23.4
. Other versions will
come out. But I am not C developer. I do not assure that my fixes done right. If
you know how to build better and smaller C binaries, your help will be welcome!