Wildduck docker image
Obtaining the Docker image
To pull the latest pre-built image of wildduck from docker hub:
docker pull nodemailer/wildduck
It is also possible to pull a specific version of wildduck by specifying the version as the image tag. (example, for version 1.20):
docker pull nodemailer/wildduck:1.20
Environment variables in the Docker image
The following docker env variables are available inside the container:
WILDDUCK_APPDIR
: The folder where wildduck is installed inside the containerWILDDUCK_CONFIG
: Path to the config file to be used with wildduck
Running wildduck using Docker
The image is configured to use the default config file
docker run nodemailer/wildduck
This is likely to fail due to mongodb
and redis
not present in localhost
inside the container. To pass custom configuration options/files to wildduck inside the docker image, the following two strategies can be used:
-
Pass
APPCONF_*
env variables to configure options using wild-configTo set a custom
mongo
andredis
host, and configure theFQDN
and the domain for receiving emails:FQDN='example.com'
MAIL_DOMAIN='mail.example.com'
docker run \
-e APPCONF_dbs_mongo='mongodb://mongo:27017/' \
-e APPCONF_dbs_redis='redis://redis:6379/3' \
-e APPCONF_smtp_setup_hostname=$FQDN \
-e APPCONF_log_gelf_hostname=$FQDN \
-e APPCONF_imap_setup_hostname=$FQDN \
-e APPCONF_emailDomain=$MAIL_DOMAIN \
nodemailer/wildduckMore details available at the wild-config documentation.
-
Mount a Docker volume with a custom configuration file:
To replace the default config folder (
/wildduck/config
) inside the docker imagedocker run -v '/config/from/host:/wildduck/config' nodemailer/wildduck