LedgerSMB Docker development & testing infrastructure
docker-compose infrastructure to kick off a local development
and test environment for LedgerSMB.
The infrastructure is based on the
ledgersmb/ledgersmb-dev-lsmb LedgerSMB containers, the
selenium tester container and the
mailhog/mailhog mail testing tool.
The postgres container is derived from the standard
postgres container, adding the
pgTAP test infrastructure. The lsmb container
holds everything required to run and test LedgerSMB. This container currently
supports versions 1.5, 1.6 and master -- the image gets updated regularly
to include dependencies for specific feature branches.
Apart from the obvious (docker, docker-compose), this project expects a LedgerSMB Git repository to exist in the current directory.
$ docker-compose -f <path> up -d
an execution environment is wrapped around the local repository.
is the path of the
docker-compose.yml held in this repository. Four
containers are created:
Development and testing against different perl versions
A script is provided to help create docker images using different Perl versions. These are based on the official Perl docker images and are not optimised for size, but can be useful for testing version-specific behaviour.
$ ./tools/make_perl_context [perl version]
Will create a new docker context for the specified perl version, from
which an image can be built and used in place of the oficial
The default configuration, all mail sent from ledgersmb is 'caught' by MailHog. This allows e-mail functionaility to be tested without sending real messages over the internet.
MailHog traps all messages, providing a web UI and API to view or retrieve them.
mailhog/mailhog container serves the web API on port 8025 and accepts
SMTP connections on port 1025.