mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-18 22:27:12 -04:00
93 lines
3.1 KiB
Docker
93 lines
3.1 KiB
Docker
FROM debian:jessie
|
|
MAINTAINER Freelock john@freelock.com
|
|
|
|
RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf
|
|
|
|
# Install Perl, Tex, Starman, psql client, and all dependencies
|
|
RUN DEBIAN_FRONTENT=noninteractive && \
|
|
apt-get update && apt-get dist-upgrade -y && apt-get -y install \
|
|
libcgi-emulate-psgi-perl libcgi-simple-perl libconfig-inifiles-perl \
|
|
libdbd-pg-perl libdbi-perl libdatetime-perl \
|
|
libdatetime-format-strptime-perl libdigest-md5-perl \
|
|
libfile-mimeinfo-perl libjson-xs-perl libjson-perl \
|
|
liblocale-maketext-perl liblocale-maketext-lexicon-perl \
|
|
liblog-log4perl-perl libmime-base64-perl libmime-lite-perl \
|
|
libmath-bigint-gmp-perl libmoose-perl libnumber-format-perl \
|
|
libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl \
|
|
libpgobject-util-dbmethod-perl libplack-perl libtemplate-perl \
|
|
libnamespace-autoclean-perl \
|
|
libtemplate-plugin-latex-perl libtex-encode-perl \
|
|
libmoosex-nonmoose-perl \
|
|
texlive-latex-recommended \
|
|
texlive-xetex \
|
|
starman \
|
|
libopenoffice-oodoc-perl \
|
|
postgresql-client \
|
|
ssmtp \
|
|
git cpanminus make gcc libperl-dev 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 1.5.6
|
|
|
|
# Install LedgerSMB
|
|
RUN cd /srv && \
|
|
curl -Lo ledgersmb-$LSMB_VERSION.tar.gz "http://downloads.sourceforge.net/project/ledger-smb/Releases/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz?r=https%3A%2F%2Fsourceforge.net%2Fprojects%2Fledger-smb%2Ffiles%2FReleases%2F$LSMB_VERSION%2F&ts=1483124209&use_mirror=superb-sea2" && \
|
|
tar -xvzf ledgersmb-$LSMB_VERSION.tar.gz
|
|
# https://sourceforge.net/projects/ledger-smb/files/Releases/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz/download && \
|
|
|
|
WORKDIR /srv/ledgersmb
|
|
|
|
# master requirements
|
|
RUN cpanm --quiet --notest \
|
|
--with-feature=starman \
|
|
--with-feature=latex-pdf-ps \
|
|
--with-feature=openoffice \
|
|
--installdeps .
|
|
|
|
# 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
|
|
|
|
# Configure outgoing mail to use host, other run time variable defaults
|
|
|
|
## sSMTP
|
|
ENV SSMTP_ROOT ar@example.com
|
|
ENV SSMTP_MAILHUB 172.17.0.1
|
|
ENV SSMTP_HOSTNAME 172.17.0.1
|
|
#ENV SSMTP_USE_STARTTLS
|
|
#ENV SSMTP_AUTH_USER
|
|
#ENV SSMTP_AUTH_PASS
|
|
ENV SSMTP_FROMLINE_OVERRIDE YES
|
|
#ENV SSMTP_AUTH_METHOD
|
|
|
|
ENV POSTGRES_HOST postgres
|
|
ENV POSTGRES_PORT 5432
|
|
ENV DEFAULT_DB lsmb
|
|
|
|
COPY start.sh /usr/local/bin/start.sh
|
|
COPY update_ssmtp.sh /usr/local/bin/update_ssmtp.sh
|
|
|
|
RUN chown www-data /etc/ssmtp /etc/ssmtp/ssmtp.conf && \
|
|
chmod +x /usr/local/bin/update_ssmtp.sh /usr/local/bin/start.sh && \
|
|
mkdir -p /var/www
|
|
|
|
# Work around an aufs bug related to directory permissions:
|
|
RUN mkdir -p /tmp && \
|
|
chmod 1777 /tmp
|
|
|
|
# Internal Port Expose
|
|
EXPOSE 5762
|
|
# If ledgersmb.conf does not exist, www-data user needs to be able to create it.
|
|
RUN chown www-data /srv/ledgersmb
|
|
USER www-data
|
|
|
|
CMD ["start.sh"]
|