From 54df230b8e04b1ed1af6f1af4545e20ee07ff696 Mon Sep 17 00:00:00 2001 From: Oliver Eyton-Williams Date: Fri, 7 May 2021 14:14:04 +0200 Subject: [PATCH] docs: add guide to using MailHog with Docker (#42047) docs: add guide to using MailHog with Docker --- docs/how-to-catch-outgoing-emails-locally.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/how-to-catch-outgoing-emails-locally.md b/docs/how-to-catch-outgoing-emails-locally.md index b184810efa..2bca0a89ea 100644 --- a/docs/how-to-catch-outgoing-emails-locally.md +++ b/docs/how-to-catch-outgoing-emails-locally.md @@ -10,12 +10,31 @@ MailHog can be installed on macOS, Windows and Linux. - [Introduction](#introduction) - [Installing MailHog](#installing-mailhog) + - [Installing MailHog with Docker](#installing-mailhog-with-docker) - [Installing MailHog on macOS](#installing-mailhog-on-macos) - [Installing MailHog on Windows](#installing-mailhog-on-windows) - [Installing MailHog on Linux](#installing-mailhog-on-linux) - [Using MailHog](#using-mailhog) - [Useful Links](#useful-links) +### Installing MailHog with Docker + +If you have Docker installed then you can use + +```bash +docker run -d --name mailhog --rm mailhog/mailhog +``` + +to start MailHog in the background and + +```bash +docker stop mailhog +``` + +to stop it. + +When the installation completes, you can start [using MailHog](#using-mailhog). + ### Installing MailHog on macOS Install MailHog on macOS with [Homebrew](https://brew.sh/):