mirror of
https://github.com/ledgersmb/ledgersmb-docker.git
synced 2025-04-19 14:47:12 -04:00
Adjust for most often changed toward the bottom
This commit is contained in:
parent
6e3269c10b
commit
7180bb7099
105
Dockerfile
105
Dockerfile
@ -21,28 +21,41 @@ RUN DEBIAN_FRONTEND=noninteractive && \
|
||||
libpgobject-util-dbmethod-perl libplack-perl libtemplate-perl \
|
||||
libnamespace-autoclean-perl \
|
||||
libtemplate-plugin-latex-perl libtex-encode-perl \
|
||||
libmoosex-nonmoose-perl \
|
||||
libmoosex-nonmoose-perl libclass-c3-xs-perl \
|
||||
texlive-latex-recommended \
|
||||
texlive-xetex \
|
||||
starman \
|
||||
libopenoffice-oodoc-perl \
|
||||
postgresql-client libtap-parser-sourcehandler-pgtap-perl pgtap postgresql-pgtap \
|
||||
ssmtp sudo \
|
||||
git make gcc libperl-dev lsb-release
|
||||
ssmtp sudo xz-utils curl \
|
||||
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
|
||||
# Local development tools
|
||||
RUN apt-get update && \
|
||||
apt install -qyy mc gettext sudo bzip2 bash-completion less meld xauth \
|
||||
lynx dnsutils net-tools \
|
||||
npm && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
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
|
||||
|
||||
ARG CACHEBUST
|
||||
# Install LedgerSMB
|
||||
WORKDIR /srv
|
||||
RUN git clone --recursive -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb
|
||||
|
||||
# Java & Nodejs for doing Dojo build
|
||||
# Uglify needs to be installed right before 'make dojo'?!
|
||||
RUN apt-get update && apt-get -y install \
|
||||
git make gcc libperl-dev npm curl && \
|
||||
update-alternatives --install /usr/bin/node nodejs /usr/bin/nodejs 100
|
||||
RUN npm install -g uglify-js@">=2.0 <3.0"
|
||||
ENV NODE_PATH /usr/local/lib/node_modules
|
||||
|
||||
WORKDIR /srv/ledgersmb
|
||||
|
||||
# Build dojo
|
||||
RUN make dojo
|
||||
|
||||
# Configure outgoing mail to use host, other run time variable defaults
|
||||
|
||||
@ -66,18 +79,11 @@ ENV DEFAULT_DB lsmb
|
||||
RUN groupmod --gid 1000 www-data
|
||||
RUN usermod --uid 1000 --gid 1000 www-data
|
||||
|
||||
WORKDIR /srv
|
||||
RUN git clone --recursive -b $LSMB_VERSION https://github.com/ledgersmb/LedgerSMB.git ledgersmb
|
||||
|
||||
WORKDIR /srv/ledgersmb
|
||||
|
||||
# Burst the Docker cache based on a flag file,
|
||||
# computed from the SHA of the head of git tree (when bind mounted)
|
||||
COPY ledgersmb.rebuild /var/www/ledgersmb.rebuild
|
||||
|
||||
COPY cpanfile /srv/ledgersmb/cpanfile
|
||||
# master requirements
|
||||
RUN curl -L https://cpanmin.us | perl - App::cpanminus && \
|
||||
cpanm --quiet --notest \
|
||||
RUN cpanm --quiet --notest \
|
||||
--with-feature=starman \
|
||||
--with-feature=latex-pdf-ps \
|
||||
--with-feature=openoffice \
|
||||
@ -90,22 +96,17 @@ RUN curl -L https://cpanmin.us | perl - App::cpanminus && \
|
||||
--installdeps .
|
||||
|
||||
# Fix Module::Runtime of old distros
|
||||
RUN cpanm Moose MooseX::NonMoose Data::Printer \
|
||||
RUN cpanm Data::Printer \
|
||||
Devel::hdb Plack::Middleware::Debug::Log4perl \
|
||||
Devel::NYTProf \
|
||||
Plack::Middleware::Debug::Profiler::NYTProf \
|
||||
Plack::Middleware::InteractiveDebugger
|
||||
|
||||
# Uglify needs to be installed right before 'make dojo'?!
|
||||
RUN npm install -g uglify-js@">=2.0 <3.0"
|
||||
RUN make dojo
|
||||
|
||||
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 && chown www-data:www-data /var/www
|
||||
Plack::Middleware::Debug::DBIProfile \
|
||||
Plack::Middleware::Debug::DBITrace \
|
||||
Plack::Middleware::Debug::Log4perl \
|
||||
Plack::Middleware::Debug::Profiler::NYTProf \
|
||||
Plack::Middleware::Debug::W3CValidate \
|
||||
Plack::Middleware::InteractiveDebugger \
|
||||
WebService::Validator::HTML::W3C && \
|
||||
npm install floatthead
|
||||
|
||||
# Work around an aufs bug related to directory permissions:
|
||||
RUN mkdir -p /tmp && \
|
||||
@ -114,31 +115,47 @@ RUN mkdir -p /tmp && \
|
||||
# Internal Port Expose
|
||||
EXPOSE 5001
|
||||
|
||||
RUN cpanm --quiet --notest --force \
|
||||
HTTP::Exception Module::Versions \
|
||||
MooseX::Constructor::AllErrors TryCatch \
|
||||
Text::PO::Parser Class::Std::Utils IO::File Devel::hdb Devel::Trepan && \
|
||||
rm -r ~/.cpanm
|
||||
|
||||
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 && chown www-data:www-data /var/www
|
||||
|
||||
# Add sudo capability
|
||||
RUN echo "www-data ALL=NOPASSWD: ALL" >>/etc/sudoers
|
||||
|
||||
RUN apt-get update && \
|
||||
apt install -y mc less bzip2 && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
# Burst the Docker cache based on a flag file,
|
||||
# computed from the SHA of the head of git tree (when bind mounted)
|
||||
COPY ledgersmb.rebuild /var/www/ledgersmb.rebuild
|
||||
COPY git-colordiff.sh /var/www/git-colordiff.sh
|
||||
|
||||
# Add temporary patches
|
||||
#COPY patch/patches.tar /tmp
|
||||
#RUN cd / && tar xvf /tmp/patches.tar && rm /tmp/patches.tar
|
||||
ENV LANG=C.UTF-8
|
||||
|
||||
RUN cpanm --quiet --notest --force \
|
||||
HTTP::AcceptLanguage Text::PO::Parser Class::Std::Utils \
|
||||
Module::Versions Regexp::Debugger PPR \
|
||||
MooseX::Constructor::AllErrors TryCatch && \
|
||||
rm -r ~/.cpanm
|
||||
# Text::PO::Parser && \
|
||||
|
||||
RUN chsh -s /bin/bash www-data
|
||||
RUN mkdir -p /usr/share/sql-ledger/users
|
||||
COPY sql-ledger/users/members /usr/share/sql-ledger/users/members
|
||||
|
||||
USER www-data
|
||||
WORKDIR /var/www
|
||||
RUN xauth add ylaho3:0 MIT-MAGIC-COOKIE-1 083b320b62214727060c3468777f3333
|
||||
|
||||
COPY mcthemes.tar.xz /var/www/mcthemes.tar.xz
|
||||
|
||||
RUN cd /var/www && \
|
||||
mkdir -p .config/mc && \
|
||||
touch .config/mc/ini && \
|
||||
tar Jxf mcthemes.tar.xz && \
|
||||
./mcthemes/mc_change_theme.sh mcthemes/puthre.theme
|
||||
|
||||
WORKDIR /srv/ledgersmb
|
||||
|
||||
CMD ["start.sh"]
|
||||
|
Loading…
Reference in New Issue
Block a user