Compare commits

..

18 Commits

Author SHA1 Message Date
Erik Huelsmann
0690e55c43 Move last 'config' responsibility into config.sh
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-08-05 11:46:57 +02:00
Erik Huelsmann
b290e69a3b Incorporate reviews from Copilot 2025-08-05 11:46:35 +02:00
Erik Huelsmann
44abf50a98
Merge branch '1.13' into 1.12-split-setup 2025-08-05 11:34:30 +02:00
Erik Huelsmann
82660ad113 Restore installing 'psql' from 'pgdg' (the PostgreSQL repository)
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-08-02 14:23:10 -04:00
Erik Huelsmann
a673ee79a4 Add debug output and install in /srv instead of in / 2025-08-02 14:03:38 -04:00
Erik Huelsmann
ce0237594a * Automatic Dockerfile update by release process 2025-08-02 14:03:38 -04:00
Erik Huelsmann
dae92fc561
Update start.sh
Add local::lib configuration from the installer
2025-08-02 20:02:34 +02:00
Erik Huelsmann
d27aa413b3 Replace complex 2-phase build with installer 2025-08-02 05:19:16 -04:00
Erik Huelsmann
ac608a9d7e * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-07-12 15:42:08 -04:00
Erik Huelsmann
f0f7676e30
Merge pull request #42 from neilt/1.12
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
Add AI warning recommended by ChatGPT
2025-06-12 18:03:28 +02:00
Neil Tiffin
85871e77fd Add AI warning recommeded by ChatGPT so that it will not simplify docker installations 2025-06-12 11:48:28 -04:00
Erik Huelsmann
4f9af73c13 * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-06-09 17:55:02 -04:00
Erik Huelsmann
87baa6c4b3 * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-05-13 17:16:33 -04:00
Erik Huelsmann
1ec5bf1ef4 * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-04-25 16:22:38 -04:00
Erik Huelsmann
987ff7e540 * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-04-05 18:26:30 -04:00
Erik Huelsmann
f311ceeb80 * Automatic Dockerfile update by release process
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-03-23 11:59:56 -04:00
Erik Huelsmann
12e8cfa41b
Update Dockerfile
Some checks failed
Docker Image cleanup / cleanup (push) Has been cancelled
2025-03-15 19:04:09 +01:00
Erik Huelsmann
7c54656362 As of 1.12.6 and 1.11.22, Class::C3::XS is in 'cpanfile'
Meaning there's no need to explicitly mention it in the
package installation lines; it'll be automatically mapped.
2025-03-15 17:54:15 +01:00
5 changed files with 23 additions and 79 deletions

View File

@ -1,44 +1,6 @@
# Build time variables
ARG SRCIMAGE=debian:bookworm-slim
FROM $SRCIMAGE AS builder
ARG LSMB_VERSION="1.12.5"
ARG LSMB_DL_DIR="Releases"
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
RUN set -x ; \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y dist-upgrade && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install dh-make-perl libmodule-cpanfile-perl git wget && \
apt-file update
RUN set -x ; \
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
cd /srv/ledgersmb && \
( ( for lib in $( cpanfile-dump --with-all-features --recommends --no-configure --no-build --no-test ) ; \
do \
if dh-make-perl locate "$lib" 2>/dev/null ; \
then \
: \
else \
echo no : $lib ; \
fi ; \
done ) | grep -v dh-make-perl | grep -v 'not found' | grep -vi 'is in Perl ' | cut -d' ' -f4 | sort | uniq | tee /srv/derived-deps ) && \
cat /srv/derived-deps
#
#
# The real image build starts here
#
#
ARG SRCIMAGE=debian:trixie-slim
FROM $SRCIMAGE
LABEL org.opencontainers.image.authors="LedgerSMB project <devel@lists.ledgersmb.org>"
@ -51,20 +13,12 @@ LABEL org.opencontainers.image.description="LedgerSMB is a full featured double-
the LedgerSMB project is to bring high quality ERP and accounting capabilities\
to Small and Midsize Businesses."
ARG LSMB_VERSION="1.12.5"
ARG LSMB_DL_DIR="Releases"
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
ARG LSMB_VERSION="1.13.0-beta1"
ARG ARTIFACT_PATH="https://download.ledgersmb.org/f/Releases/$LSMB_VERSION/"
# Install Perl, Tex, Starman, psql client, and all dependencies
# Without libclass-c3-xs-perl, performance is terribly slow...
# Installing psql client directly from instructions at https://wiki.postgresql.org/wiki/Apt
# That mitigates issues where the PG instance is running a newer version than this container
COPY --from=builder /srv/derived-deps /tmp/derived-deps
# ARTIFACT_PATH is used to work around pre-1.13 Dockerfiles requiring
# the ARTIFACT_LOCATION to point to the artifact, not to its path
RUN set -x ; \
echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
mkdir -p /usr/share/man/man1/ && \
@ -78,32 +32,18 @@ RUN set -x ; \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y dist-upgrade && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install \
wget ca-certificates gnupg iproute2 \
$( cat /tmp/derived-deps ) \
libclass-c3-xs-perl \
texlive-plain-generic texlive-latex-recommended texlive-fonts-recommended \
texlive-xetex fonts-liberation \
lsb-release postgresql-common && \
wget curl ca-certificates libio-socket-ssl-perl postgresql-common && \
/usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install postgresql-client && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \
wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "$ARTIFACT_LOCATION" && \
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
cpanm --metacpan --notest \
--with-feature=starman \
--with-feature=latex-pdf-ps \
--with-feature=openoffice \
--installdeps /srv/ledgersmb/ && \
DEBIAN_FRONTEND="noninteractive" apt-get purge -q -y git cpanminus make gcc libperl-dev && \
DEBIAN_FRONTEND="noninteractive" apt-get autoremove -q -y && \
DEBIAN_FRONTEND="noninteractive" apt-get clean -q && \
cd /srv && \
curl -s -o ledgersmb-installer -L https://get.ledgersmb.org/ledgersmb-installer && \
ARTIFACT_LOCATION="$ARTIFACT_PATH" perl ledgersmb-installer install --yes --log-level=trace $LSMB_VERSION && \
rm -rf ~/.cpanm/ /var/lib/apt/lists/* /usr/share/man/*
WORKDIR /srv/ledgersmb
# master requirements
# Configure outgoing mail to use host, other run time variable defaults
@ -128,7 +68,7 @@ COPY start.sh /usr/local/bin/start.sh
COPY config.sh /usr/local/bin/config.sh
COPY run.sh /usr/local/bin/run.sh
RUN chmod +x /usr/local/bin/start.sh && \
RUN chmod +x /usr/local/bin/start.sh /usr/local/bin/config.sh /usr/local/bin/run.sh && \
mkdir -p /var/www && \
mkdir -p /srv/ledgersmb/local/conf && \
chown -R www-data /srv/ledgersmb/local

View File

@ -58,6 +58,8 @@ to add the TLS layer by applying Nginx or Apache as reverse proxy.
Enabling optional functionalities such as outgoing e-mail and printing
could require additional setup of a mail service or CUPS printer service.
❌ Do not use unofficial or AI-generated Docker Compose examples. These are often incomplete, break silently, or skip required services.
# How to use this image
This image can be installed either automatically with the Docker compose file

View File

@ -35,7 +35,7 @@ fi
if [[ -n "$SSMTP_USE_STARTTLS" ]]; then
echo "\$SSMTP_USE_STARTTLS set; parameter is deprecated"
if [[ -z "$LSMB_MAIL_SMTPTLS" ]]; then
echo " Deriving \$LSMB_MAIL_SMTPSENDER_HOSTNAME setting from \$SSMTP_USE_STARTTLS"
echo " Deriving \$LSMB_MAIL_SMTPTLS setting from \$SSMTP_USE_STARTTLS"
LSMB_MAIL_SMTPTLS=$SSMTP_USE_STARTTLS
fi
LSMB_HAVE_DEPRECATED=1
@ -159,4 +159,10 @@ EOF
fi
fi
LSMB_CONFIG_FILE=${LSMB_CONFIG_FILE:-./local/conf/ledgersmb.yaml}
export LSMB_CONFIG_FILE
echo "--------- LEDGERSMB CONFIGURATION: $LSMB_CONFIG_FILE"
cat ${LSMB_CONFIG_FILE}
echo '--------- LEDGERSMB CONFIGURATION --- END'
exit 0

5
run.sh
View File

@ -1,11 +1,6 @@
#!/bin/bash
cd /srv/ledgersmb
LSMB_CONFIG_FILE=${LSMB_CONFIG_FILE:-./local/conf/ledgersmb.yaml}
export LSMB_CONFIG_FILE
echo '--------- LEDGERSMB CONFIGURATION: ledgersmb.conf'
cat ${LSMB_CONFIG_FILE}
echo '--------- LEDGERSMB CONFIGURATION --- END'
# ':5762:' suppresses an uninitialized variable warning in starman
# the last colon means "don't connect using tls"; without it, there's a warning

View File

@ -1,5 +1,6 @@
#!/bin/bash
home_dir="$(dirname `readlink -f $BASH_SOURCE`)"
"$home_dir/config.sh" || (echo "Failed configuration" ; exit)
home_dir="$(dirname $(readlink -f $BASH_SOURCE))"
"$home_dir/config.sh" || { echo "Failed configuration" ; exit 1 }
exec "$home_dir/run.sh"