diff --git a/Dockerfile b/Dockerfile index 315ba4e..5b64c77 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM debian:jessie +FROM perl:5 MAINTAINER Freelock john@freelock.com # 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 && \ 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 EXPOSE 5000 #USER www-data diff --git a/start.sh b/start.sh index 44f6507..628c93e 100755 --- a/start.sh +++ b/start.sh @@ -23,5 +23,8 @@ if [ ! -z ${CREATE_DATABASE+x} ]; then --postgres_password "$POSTGRES_PASS" fi +# Needed for modules loaded by cpanm +export PERL5LIB=/usr/local/lib/perl5/site_perl/5.22.0 + # start ledgersmb exec starman tools/starman.psgi