Skip to content

Support multiple processor architecture (ARM, M1, AMD64, x86)

License

Notifications You must be signed in to change notification settings

Open-Harbor-IO/mailhog

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mailhog

Since the official MailHog Docker image don't natively support M1 I needed a custom build for my setup.

Supported architectures: linux/arm64, linux/amd64, linux/amd64/v2, linux/ppc64le & linux/s390x

Docker hub

https://hub.docker.com/r/openharbor/mailhog

What it does

Pull golang:1.18-apline then install MailHog:1.0.1 from source. Finaly it fetch the latest alpine image and copy compiled MailHog to it to get the lighest image possible. It also fix a bug with boot2docker (github issues #581)

Build, push and usage

Build your own copy

If you want to build your own image and/or version, you can download this Dockerfile and modify it for your needs. You then have to type the following command:

$ docker build -t openharbor/mailhog:<version> -t openharbor/mailhog:latest --platform linux/arm64,linux/amd64,linux/amd64/v2,linux/ppc64le,linux/s390x .

You should replace openharbor with your docker username and mailhog with your image name. You can also change the platform list depending on what's available on your system. To know what's the platform you can build for from your machine type:

$ docker buildx ls

Publish your version

To publish your own version to docker hub, you'll need to type the following commands:

$ docker push openharbor/mailhog:<version>
$ docker push openharbor/mailhog:latest

Where you also changes openharbor with your username and mailhog with your new image name.

Usage in docker compose

To use a custom image in your docker-compose.yml it's like using any other image, all you have to supply is the username and project published to docker hub.

version: "3"
services:
  mailhog:
    image: openharbor/mailhog
    ports:
      - "1025:1025" # smtp server
      - "8025:8025" # web ui

Regular docker usage

Follow the docker run documentation with the custom image specified:

$ docker run --rm --name my-container-name openharbor/mailhog

About

Support multiple processor architecture (ARM, M1, AMD64, x86)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 100.0%