docker-mailcatcher

Dockerimage for mailcatcher SMTP service.
Log | Files | Refs | README

commit 36ad5a5cfba96a177738906fca7cd933fa811ed0
Author: beardyjay <jay@beardyjay.co.uk>
Date:   Sat,  7 Dec 2019 11:34:58 +0000

Moving to own repo.

Diffstat:
A.travis.yml | 17+++++++++++++++++
ADockerfile | 21+++++++++++++++++++++
AREADME.md | 23+++++++++++++++++++++++
3 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/.travis.yml b/.travis.yml @@ -0,0 +1,17 @@ +--- +services: docker + +before_install: + # Upgrade Docker. + - sudo apt-get update + - sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce + +script: + # Test building Dockerfile. + - docker build -t docker-mailcatcher . + + # Test running the container. + - docker run --name test-container docker-mailcatcher + + # Verify Mailcatcher is available in the container. + - docker exec --tty test-container env TERM=xterm mailcatcher --version diff --git a/Dockerfile b/Dockerfile @@ -0,0 +1,21 @@ +FROM alpine:latest +MAINTAINER beardyjay <jay@beardyjay.co.uk> + +RUN apk add --update \ + ruby \ + ruby-dev \ + ruby-etc \ + ruby-bigdecimal \ + build-base \ + libstdc++ \ + sqlite \ + sqlite-dev \ + && gem install json --no-ri --no-rdoc \ + && gem install mailcatcher -v 0.7.1 --no-ri --no-rdoc \ + && apk del --purge ruby-dev build-base \ + && rm -rf /var/cache/apk/* + +EXPOSE 1025 +EXPOSE 1080 + +CMD ["mailcatcher", "-f", "--ip=0.0.0.0"] diff --git a/README.md b/README.md @@ -0,0 +1,23 @@ +# Mailcatcher + +Super small 36MB image of the latest version 0.7.1 release of [mailcatcher][1]. + + +## How to Build + + 1. `cd` into this directory. + 2. Run `docker build -t beardyjay/mailcatcher .` + + +## How to Use + + 1. Pull this image from Docker Hub: `docker pull beardyjay/mailcatcher:latest` + 2. Run a container in the foreground: `docker run -p 1080:1080 -p 1025:1025 -ti --rm beardyjay/mailcatcher` + 3. Run a container in the background: `docker run -d -p 1080:1080 -p 1025:1025 -ti beardyjay/mailcatcher` + +## Notes + +Connect to http://127.0.0.1:1080 to view messages send messages to 127.0.0.1:1025 + + +[1]: https://rubygems.org/gems/mailcatcher/