MailCatcher runs a super simple SMTP server which catches any message sent to it to display in a web interface.
Pull the image from the GitHub Package Registry. This is the recommended method of installation as it is easier to update image.
docker pull docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest
Build the image locally
git clone [email protected]:Rebilly/docker-mailcatcher.git
cd docker-mailcatcher
docker build -t docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest .
Using docker-compose.yml
services:
mailcatcher:
restart: on-failure:10
image: docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest
ports:
- "1080:1080"
- "1025:1025"
Alternately, you can manually launch the mailcatcher container.
docker run --name='mailcatcher' -d --publish=1080:1080 --publish=1025:1025 \
docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest
The image is hosted on GitHub Package Registry.
Read the Configuring Docker for use with GitHub Package Registry to learn how to publish new version of image.
There is an example:
docker login docker.pkg.github.com -u USERNAME -p TOKEN
docker build -t docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest .
docker push docker.pkg.github.com/rebilly/docker-mailcatcher/mailcatcher:latest