Switch Master branch to use perl:5 base image, and load necessary modules using cpanm

This commit is contained in:
John Locke 2015-07-05 11:34:01 -07:00
parent 07db28af99
commit e20f3a1899
2 changed files with 22 additions and 1 deletions

View File

@ -1,4 +1,4 @@
FROM debian:jessie FROM perl:5
MAINTAINER Freelock john@freelock.com MAINTAINER Freelock john@freelock.com
# Build time variables # Build time variables
@ -62,6 +62,24 @@ RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
chmod +x /usr/bin/update_ssmtp.sh /usr/bin/start.sh && \ chmod +x /usr/bin/update_ssmtp.sh /usr/bin/start.sh && \
mkdir -p /var/www mkdir -p /var/www
# 1.5 requirements
RUN apt-get install -y \
libpgobject-perl \
libpgobject-simple-perl \
libpgobject-simple-role-perl \
libpgobject-util-dbmethod-perl
RUN cpanm \
Carton PGObject::Type::BigFloat \
PGObject::Composite \
PGObject::Type::JSON \
PGObject::Type::Composite \
PGObject::Type::DateTime \
App::LedgerSMB::Admin
# Not sure why this is not set correctly, and also why
# it gets overridden here -- moved to start.sh.
# ENV PERL5LIB /usr/local/lib/perl5/site_perl/5.22.0
# Internal Port Expose # Internal Port Expose
EXPOSE 5000 EXPOSE 5000
#USER www-data #USER www-data

View File

@ -23,5 +23,8 @@ if [ ! -z ${CREATE_DATABASE+x} ]; then
--postgres_password "$POSTGRES_PASS" --postgres_password "$POSTGRES_PASS"
fi fi
# Needed for modules loaded by cpanm
export PERL5LIB=/usr/local/lib/perl5/site_perl/5.22.0
# start ledgersmb # start ledgersmb
exec starman tools/starman.psgi exec starman tools/starman.psgi