Compare commits

..

2 Commits

Author SHA1 Message Date
Erik Huelsmann
8d6e8fe95b * Automatic Dockerfile update by release process 2021-05-02 13:05:16 -04:00
Erik Huelsmann
3156651671 * Automatic Dockerfile update by release process 2021-03-21 09:02:57 -04:00
4 changed files with 68 additions and 77 deletions

View File

@@ -1,52 +1,9 @@
FROM debian:buster-slim
MAINTAINER Freelock john@freelock.com
# Build time variables # Build time variables
ARG LSMB_VERSION="1.8.12"
ARG SRCIMAGE=debian:bullseye-slim
FROM $SRCIMAGE AS builder
ARG LSMB_VERSION="1.9.2"
ARG LSMB_DL_DIR="Releases" 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 -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \
DEBIAN_FRONTEND="noninteractive" apt-get -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
#
#
FROM $SRCIMAGE
LABEL org.opencontainers.image.authors="LedgerSMB project <devel@lists.ledgersmb.org>"
ARG LSMB_VERSION="1.9.2"
ARG LSMB_DL_DIR="Releases"
ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz"
# Install Perl, Tex, Starman, psql client, and all dependencies # Install Perl, Tex, Starman, psql client, and all dependencies
# Without libclass-c3-xs-perl, performance is terribly slow... # Without libclass-c3-xs-perl, performance is terribly slow...
@@ -56,11 +13,7 @@ ARG ARTIFACT_LOCATION="https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSI
# Install Locale::Codes Locale::Country Locale::Language from CPAN to suppress # Install Locale::Codes Locale::Country Locale::Language from CPAN to suppress
# deprecation-as-core-module warning # deprecation-as-core-module warning
RUN echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
COPY --from=builder /srv/derived-deps /tmp/derived-deps
RUN set -x ; \
echo -n "APT::Install-Recommends \"0\";\nAPT::Install-Suggests \"0\";\n" >> /etc/apt/apt.conf && \
mkdir -p /usr/share/man/man1/ && \ mkdir -p /usr/share/man/man1/ && \
mkdir -p /usr/share/man/man2/ && \ mkdir -p /usr/share/man/man2/ && \
mkdir -p /usr/share/man/man3/ && \ mkdir -p /usr/share/man/man3/ && \
@@ -68,14 +21,38 @@ RUN set -x ; \
mkdir -p /usr/share/man/man5/ && \ mkdir -p /usr/share/man/man5/ && \
mkdir -p /usr/share/man/man6/ && \ mkdir -p /usr/share/man/man6/ && \
mkdir -p /usr/share/man/man7/ && \ mkdir -p /usr/share/man/man7/ && \
mkdir -p /usr/share/man/man8/ && \
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \ DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \ DEBIAN_FRONTEND="noninteractive" apt-get -y upgrade && \
DEBIAN_FRONTEND="noninteractive" apt-get -y install \ DEBIAN_FRONTEND="noninteractive" apt-get -y install \
wget ca-certificates gnupg \ wget ca-certificates gnupg \
$( cat /tmp/derived-deps ) \ libauthen-sasl-perl libcgi-emulate-psgi-perl libconfig-inifiles-perl \
libclass-c3-xs-perl \ libcookie-baker-perl libdbd-pg-perl libdbi-perl libdata-uuid-perl \
texlive-plain-generic texlive-latex-recommended texlive-fonts-recommended \ libdatetime-perl libdatetime-format-strptime-perl \
libemail-sender-perl libemail-stuffer-perl libfile-find-rule-perl \
libhtml-escape-perl libhttp-headers-fast-perl libio-stringy-perl \
libjson-maybexs-perl libcpanel-json-xs-perl libjson-pp-perl \
liblist-moreutils-perl \
liblocale-maketext-perl liblocale-maketext-lexicon-perl \
liblog-log4perl-perl libmime-types-perl \
libmath-bigint-gmp-perl libmodule-runtime-perl libmoo-perl \
libmoox-types-mooselike-perl libmoose-perl \
libmoosex-nonmoose-perl libnumber-format-perl \
libpgobject-perl libpgobject-simple-perl libpgobject-simple-role-perl \
libpgobject-type-bigfloat-perl libpgobject-type-datetime-perl \
libpgobject-type-bytestring-perl libpgobject-util-dbmethod-perl \
libpgobject-util-dbadmin-perl libplack-perl \
libplack-builder-conditionals-perl libplack-middleware-reverseproxy-perl \
libplack-request-withencoding-perl libscope-guard-perl \
libsession-storage-secure-perl libstring-random-perl \
libtemplate-perl libtext-csv-perl libtext-csv-xs-perl \
libtext-markdown-perl libtry-tiny-perl libversion-compare-perl \
libxml-libxml-perl libnamespace-autoclean-perl \
starman starlet libhttp-parser-xs-perl \
libtemplate-plugin-latex-perl libtex-encode-perl \
libxml-twig-perl libopenoffice-oodoc-perl \
libexcel-writer-xlsx-perl libspreadsheet-writeexcel-perl \
libclass-c3-xs-perl liblocale-codes-perl \
texlive-latex-recommended texlive-fonts-recommended \
texlive-xetex fonts-liberation \ texlive-xetex fonts-liberation \
lsb-release && \ lsb-release && \
echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \ echo "deb http://apt.postgresql.org/pub/repos/apt/ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list && \
@@ -83,9 +60,10 @@ RUN set -x ; \
DEBIAN_FRONTEND="noninteractive" apt-get -y update && \ DEBIAN_FRONTEND="noninteractive" apt-get -y update && \
DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \ DEBIAN_FRONTEND="noninteractive" apt-get -y install postgresql-client && \
DEBIAN_FRONTEND="noninteractive" apt-get -q -y install git cpanminus make gcc libperl-dev && \ 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" && \ wget --quiet -O /tmp/ledgersmb-$LSMB_VERSION.tar.gz "https://download.ledgersmb.org/f/$LSMB_DL_DIR/$LSMB_VERSION/ledgersmb-$LSMB_VERSION.tar.gz" && \
tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \ tar -xzf /tmp/ledgersmb-$LSMB_VERSION.tar.gz --directory /srv && \
rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \ rm -f /tmp/ledgersmb-$LSMB_VERSION.tar.gz && \
cpanm --reinstall --notest Locale::Country Locale::Codes Locale::Language && \
cpanm --notest \ cpanm --notest \
--with-feature=starman \ --with-feature=starman \
--with-feature=latex-pdf-ps \ --with-feature=latex-pdf-ps \

View File

@@ -4,10 +4,9 @@ Dockerfile for LedgerSMB Docker image
# Supported tags # Supported tags
- `1.9`, `1.9.x`, `latest` - Latest official release from the 1.9 branch - `1.8`, `1.8.x`, `latest` - Latest official release from the 1.8 branch
- `1.8`, `1.8.x` - Latest official release from the 1.8 branch
- `1.7`, `1.7.x` - Latest official release from 1.7 branch - `1.7`, `1.7.x` - Latest official release from 1.7 branch
- `1.6`, `1.6.33` - Last official release from 1.6 branch - `1.6`, `1.6.x` - Latest official release from 1.6 branch
- `1.5`, `1.5.30` - Last official release from 1.5 branch - `1.5`, `1.5.30` - Last official release from 1.5 branch
- `1.4`, `1.4.42` - Last official release from 1.4 branch - `1.4`, `1.4.42` - Last official release from 1.4 branch
- `master` - Master branch from git, unstable - `master` - Master branch from git, unstable
@@ -72,7 +71,7 @@ The database username and password are:
``` ```
From here, follow the steps as detailed in the instructions for From here, follow the steps as detailed in the instructions for
[preparing for first use](https://ledgersmb.org/content/preparing-ledgersmb-19-first-use). [preparing for first use](https://ledgersmb.org/content/preparing-ledgersmb-17-first-use).
## Manual installation ## Manual installation
@@ -149,6 +148,30 @@ affect the performance experience of users.
## Mail configuration ## Mail configuration
### Before 1.8.0
These variables are used to set outgoing SMTP defaults.
* `SSMTP_ROOT` (config: `Root` -- DEPRECATED)
* `SSMTP_MAILHUB` (config: `Mailhub`)
* `SSMTP_HOSTNAME` (config: `Hostname`)
* `SSMTP_USE_STARTTLS` (config: `UseSTARTTLS`)
* `SSMTP_AUTH_USER` (config: `AuthUser`)
* `SSMTP_AUTH_PASS` (config: `AuthPass`)
* `SSMTP_AUTH_METHOD` (config: `AuthMethod` -- DEPRECATED)
* `SSMTP_FROMLINE_OVERRIDE` (config: `FromLineOverride` -- DEPRECATED)
`SSMTP_MAILHUB` defaults to the default docker0 interface, so if your host is
already configured to relay mail, this should relay successfully with only
the root and hostname set.
Use the other environment variables to relay mail through a different host.
Use the [ssmtp.conf man
page](https://www.systutorials.com/docs/linux/man/5-ssmtp.conf/) to look up
the meaning and function of each of the mail configuration keys.
### 1.8.0 and higher (under development)
As of 1.8.0, the image is based on Debian Buster instead of Debian Stretch; As of 1.8.0, the image is based on Debian Buster instead of Debian Stretch;
with Buster, the `ssmtp` program has been removed from Debian, this image with Buster, the `ssmtp` program has been removed from Debian, this image
had to change strategy. The main application always came with built-in e-mail had to change strategy. The main application always came with built-in e-mail
@@ -181,8 +204,9 @@ please contact us on the [mailing list](http://ledgersmb.org/topic/support/maili
or through a [GitHub issue](https://github.com/ledgersmb/ledgersmb-docker/issues). or through a [GitHub issue](https://github.com/ledgersmb/ledgersmb-docker/issues).
You can also reach some of the official LedgerSMB maintainers via the You can also reach some of the official LedgerSMB maintainers via the
[Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org). `#ledgersmb` IRC channel on [Freenode](https://freenode.net), or on the
The [Element](https://app.element.io/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended. bridged [Matrix](https://matrix.org) room in [#ledgersmb:matrix.org](https://matrix.to/#/#ledgersmb:matrix.org).
The [Riot.im](https://riot.im/app/#/room/#ledgersmb:matrix.org) Matrix client is highly recommended.
## Contributing ## Contributing

View File

@@ -16,7 +16,7 @@ services:
# because that allows us to use the default hostname ("postgres") # because that allows us to use the default hostname ("postgres")
# from the LedgerSMB configuration # from the LedgerSMB configuration
postgres: postgres:
image: postgres:12-alpine image: postgres:9.6-alpine
environment: environment:
# Replace the password below for a secure setup # Replace the password below for a secure setup
POSTGRES_PASSWORD: abc POSTGRES_PASSWORD: abc
@@ -28,7 +28,7 @@ services:
lsmb: lsmb:
depends_on: depends_on:
- postgres - postgres
image: ledgersmb/ledgersmb:1.9 image: ledgersmb/ledgersmb:1.8
networks: networks:
- internal - internal
- default - default
@@ -58,15 +58,6 @@ services:
# SSMTP_AUTH_METHOD: # SSMTP_AUTH_METHOD:
# SSMTP_USE_STARTTLS: # SSMTP_USE_STARTTLS:
# SSMTP_FROMLINE_OVERRIDE: # SSMTP_FROMLINE_OVERRIDE:
#
#
# The PROXY_IP environment variable lets you set the IP address
# (range) of the reverse proxy used for TLS termination, which forwards
# its requests to this container. When this reverse proxy runs on the
# Docker host, the default below applies. In case the reverse proxy is
# hosted in a separate container, this setting needs to be adjusted.
#
# PROXY_IP: 172.17.0.1/12
# having the dbdata volume is required to persist our # having the dbdata volume is required to persist our
# data between PostgreSQL container updates; without # data between PostgreSQL container updates; without

View File

@@ -85,8 +85,6 @@ ${LSMB_MAIL_SMTPHOST:+smtphost=$LSMB_MAIL_SMTPHOST
}${LSMB_MAIL_SMTPPASS:+smtppass=$LSMB_MAIL_SMTPPASS }${LSMB_MAIL_SMTPPASS:+smtppass=$LSMB_MAIL_SMTPPASS
}${LSMB_MAIL_SMTPAUTHMECH:+smtpauthmech=$LSMB_MAIL_SMTPAUTHMECH }${LSMB_MAIL_SMTPAUTHMECH:+smtpauthmech=$LSMB_MAIL_SMTPAUTHMECH
} }
[proxy]
ip=${PROXY_IP:-172.17.0.1/12}
EOF EOF
export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf' export LSMB_CONFIG_FILE='/tmp/ledgersmb.conf'
fi fi
@@ -102,6 +100,6 @@ echo '--------- LEDGERSMB CONFIGURATION --- END'
# ':5762:' suppresses an uninitialized variable warning in starman # ':5762:' suppresses an uninitialized variable warning in starman
# the last colon means "don't connect using tls"; without it, there's a warning # the last colon means "don't connect using tls"; without it, there's a warning
exec starman --listen :5762: --workers ${LSMB_WORKERS:-5} \ exec starman --listen :5762: --max-workers ${LSMB_WORKERS:-5} \
-I lib -I old/lib \ -I lib -I old/lib \
--preload-app bin/ledgersmb-server.psgi --preload-app bin/ledgersmb-server.psgi