FROM ubuntu:16.10 COPY greetings.pl /opt/ CMD perl /opt/greetings.pl
use 5.010; use strict; use warnings; print "What is your name? "; my $name = <STDIN>; chomp $name; say "Hello $name, how are you today?";
$ docker run mydocker Use of uninitialized value $name in scalar chomp at /opt/greetings.pl line 7. Use of uninitialized value $name in concatenation (.) or string at /opt/greetings.pl line 8. What is your name? Hello , how are you today?
We need to tell Docker that this is an interactive process
docker run -it mydocker