good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Docker Container Started With Docker-Compose and <STDIN>by gflohr (Acolyte) |
on Sep 12, 2019 at 15:46 UTC ( [id://11106075]=perlquestion: print w/replies, xml ) | Need Help?? |
gflohr has asked for the wisdom of the Perl Monks concerning the following question: A Perl script is supposed to run on a regular system, under Windows, and inside a docker container via docker-compose. The following line gives me a headache:
It is clear that this will not work in my container because there is no standard input. I want it to fail and bail out. The problem is that it never returns. How can I detect that situation in a clean way? One solution would be to check whether I'm running inside a container and then bail out right away. But that is ugly and maybe not very reliable. I could also try to set an alarm but that may not work under Windows. Any better idea?
Back to
Seekers of Perl Wisdom
|
|