Perl Docker image
This repository contains the source for building various versions of
the Perl application as a reproducible Docker image using
Users can choose between RHEL and CentOS based builder images.
The resulting image can be run using Docker.
For RHEL based image
$ s2i build https://github.com/openshift/s2i-perl.git --context-dir=5.24/test/sample-test-app/ rhscl/perl-524-rhel7 perl-sample-app $ docker run -p 8080:8080 perl-sample-app
For CentOS based image
$ s2i build https://github.com/openshift/s2i-perl.git --context-dir=5.24/test/sample-test-app/ centos/perl-524-centos7 perl-sample-app $ docker run -p 8080:8080 perl-sample-app
Accessing the application:
$ curl 127.0.0.1:8080
CentOS based Dockerfile.
RHEL based Dockerfile. In order to perform build or test actions on this
Dockerfile you need to run the action on a properly subscribed RHEL machine.
This folder contains scripts that are run by S2I:
Used to install the sources into a location where the application
will be run and prepare the application for deployment (eg. installing
In order to install application dependencies, the application must contain a
cpanfilefile, in which the user specifies the modules and their versions.
An example of a cpanfile is available within our test application.
All files with
.plextension are handled by mod_perl.
If exactly one file with
.psgiextension exists in the top-level
directory, the mod_perl will be autoconfigured to execute the PSGI
application for any request URI path with Plack's mod_perl adaptor.
This script is responsible for running the application, using the
Apache web server.
This script prints the usage of this image.
This folder contains a file with commonly used modules.
This folder contains the S2I
To set environment variables, you can place them as a key value pair into a
file inside your source code repository.
Allow the installation of all specified cpan packages and the running of their tests. The default value is
This variable specifies a mirror URL which will used by cpanminus to install dependencies.
By default the URL is not specified.
Set this to "true" to enable automatic reloading of modified Perl modules.
directive sets the number of child server processes created on startup. Default is 8.
Number of simultaneous requests that will be handled by Apache. The default
is 256, but it will be automatically lowered if memory is limited.
Override PSGI application detection.
If the PSGI_FILE variable is set to empty value, no PSGI application will
be detected and mod_perl not be reconfigured.
If the PSGI_FILE variable is set and non-empty, it will define path to
the PSGI application file. No detection will be used.
If the PSGI_FILE variable does not exist, autodetection will be used:
If exactly one ./*.psgi file exists, mod_perl will be configured to
execute that file.
This variable overrides location URI path that is handled path the PSGI
application. Default value is "/".