Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Docker: Perl Hello World in script

FROM ubuntu:20.04
COPY hello_world.pl /opt/
CMD  perl /opt/hello_world.pl
use 5.010;
use strict;
use warnings;

say 'Hello World from Perl script';

$ docker build -t mydocker .
$ docker run -it --rm mydocker
Hello World from Perl script