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