CGI doesn't work like that. You'll have to add a CGI-capable web-server (Apache; ACME Labs mini_httpd/thttpd; anything else?) to your container image and set it up for your web app to work. Mojolicious and other Perl web frameworks, on the other hand, have an embedded web server in them.