https://hub.docker.com/r/iliadmitriev/mailcatcher
MailCatcher - is a ruby powered alpine image, based on https://mailcatcher.me. Its purpose is to provide a way of testing applications wich uses emails (i.e. sign in with email or email confirmation)
For amd64(x86_64) and arm64(aarch64)
- Simple SMTP server
- WEB interface
Build image from Dockerfile
docker build -t mailcatcher -f Dockerfile ./
Create and run docker container from image
You need two tcp ports:
- 1080 - web interface port
- 1025 - smtp port
docker run -d -p 1080:1080 -p 1025:1025 --name mailcatcher mailcatcher
curl \
-F '=(;type=multipart/alternative' \
-F '=<sample.txt;type=text/plain' \
-F '=<sample.html;type=text/html' \
-F '=)' \
-F '=@sample.png;encoder=base64;headers="Content-ID: sample.png"' \
--url 'smtp://localhost:1025' \
-H "Subject: Test message of 3 parts" \
--mail-from 'sender@example.com' \
--mail-rcpt 'recipient@example.com'
docker logs -f mailcatcher
Address http://localhost:1080/
- HTML - html view of email
- Plain text - plain text email alternative
- Source - source code of email
- Download - download email in eml format
- Clear - delete all emails
- create buildx context and set is as default
docker buildx create --use --name mybuild
- build and push to repository
docker buildx build --platform linux/amd64,linux/arm64 \
-t iliadmitriev/mailcatcher:latest --push ./
- stop context and switch to default
docker buildx stop
docker buildx use default
GitHub Action https://github.com/docker/build-push-action/blob/master/docs/advanced/multi-platform.md