diff --git a/Dockerfile b/Dockerfile index 1896419..4971ce3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> # Install Perl, Tex, Starman, psql client, and all dependencies -RUN DEBIAN_FRONTENT=noninteractive && \ +RUN DEBIAN_FRONTEND=noninteractive && \ apt-get update && apt-get -y install \ libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \ libdbd-pg-perl libdbi-perl libdatetime-perl \ @@ -25,36 +25,36 @@ RUN DEBIAN_FRONTENT=noninteractive && \ libopenoffice-oodoc-perl \ postgresql-client \ ssmtp \ - git cpanminus make gcc libperl-dev lsb-release + lsb-release -# Java & Nodejs for doing Dojo build -#RUN DEBIAN_FRONTENT=noninteractive && apt-get install -y openjdk-7-jre-headless -RUN apt-get install -y npm -RUN update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100 # Build time variables ENV LSMB_VERSION master +ENV NODE_PATH /usr/local/lib/node_modules +ENV DEBIAN_FRONTEND=noninteractive + ARG CACHEBUST -# Install LedgerSMB -RUN cd /srv && \ - git clone --recursive -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb - -WORKDIR /srv/ledgersmb - -# master requirements -RUN cpanm --quiet --notest \ - --with-feature=starman \ - --with-feature=latex-pdf-ps \ - --with-feature=openoffice \ - --installdeps . +# Java & Nodejs for doing Dojo build # Uglify needs to be installed right before 'make dojo'?! -RUN npm install -g uglify-js@">=2.0 <3.0" -ENV NODE_PATH /usr/local/lib/node_modules - -# Build dojo -RUN make dojo +RUN apt-get -y install git make gcc libperl-dev npm curl && \ + update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100 && \ + cd /srv && \ + git clone --recursive -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb && \ + cd ledgersmb && \ + curl -L https://cpanmin.us | perl - App::cpanminus && \ + cpanm --quiet --notest \ + --with-feature=starman \ + --with-feature=latex-pdf-ps \ + --with-feature=openoffice \ + --installdeps . && \ + npm install -g uglify-js@">=2.0 <3.0" && \ + make dojo && \ + apt-get purge -y npm git make gcc libperl-dev nodejs curl && \ + rm -rf /usr/local/lib/node_modules && \ + apt-get autoremove -y && \ + apt-get autoclean # Configure outgoing mail to use host, other run time variable defaults