Azure has recently announced App Services on Linux. It supports running web apps natively on Linux. You can quickly create an app following Link and setup continuous deployment to publish the app.
Web Apps on Linux is built using Docker. So you can use a Custom Docker image to deploy your web app to an application stack that is not already defined in Azure - Link
This Blog would provide an overview of Creating and running Custom Container to run perl application in web apps on Linux.
Below are list of steps my DockerFile has to create App Service Perl image Github Repo : https://github.com/prashanthmadi/appserviceperl
FROM httpd:2.4
COPY ./my-httpd.conf /usr/local/apache2/conf/httpd.conf
/home/site/wwwroot folderRUN rm -f /usr/local/apache2/logs/* \
&& chmod 777 /usr/local/apache2/logs \
&& rm -rf /usr/local/apache2/htdocs \
&& rm -rf /usr/local/apache2/logs \
&& mkdir -p /home/site/wwwroot \
&& mkdir -p /home/LogFiles \
&& chown -R root:www-data /home \
&& ln -s /home/site/wwwroot /usr/local/apache2/htdocs \
&& ln -s /home/LogFiles /usr/local/apache2/logs
RUN apt-get update \
&& apt-get install make \
&& apt-get install -y perl
RUN mkdir -p /home/cpan
COPY ./cpanfile /home/cpan/cpanfile
RUN apt-get install -y curl \
&& cd /home/cpan \
&& curl -LO http://xrl.us/cpanm \
&& apt-get install -y libhtml-parser-perl \
&& perl cpanm --force --installdeps .
RUN rm -rf /home/cpan
####Installing Custom Container to run Perl App on Web Apps Linux
####Testing App:
index.pl file with below content and deploy it using FTP/Git.#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print "Hello, World.";
<your_webapp_name>.azurewebsites.net/ and it should show "Hello World"####Extending Custom Container to install more Perl dependencies For adding extra modules, make a fork of my github repo. https://github.com/prashanthmadi/appserviceperl
change content in cpanfile (samples available at below link)… https://github.com/kraih/mojo/wiki/Installation-of-cpan-modules-by-cpanm-and-cpanfile
Publish your new project to dockerhub and use it while configuring container.
Content type
Image
Digest
Size
99.7 MB
Last updated
over 9 years ago
docker pull prashanthmadi/appserviceperl