Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimise the Dockerfile for Docker Hub Automated Builds. #118

Merged
merged 1 commit into from
Nov 14, 2016

Conversation

blueimp
Copy link
Contributor

@blueimp blueimp commented Oct 23, 2016

Installs ca-certificates, required for the "release message" feature.
With the current mailhog/mailhog docker image, releasing messages to an SMTP server via TLS fails:

Failed to release message: x509: failed to load system roots and no roots provided

Removes any build dependencies after install, optimising docker image size.
The image size is about the same as the Rocker based build, but works with plain Docker and can therefore be used via Docker Hub Automated Builds.

Runs with a non-privileged user account instead of as root, increasing security.
Assigning the user ID 1000 allows host volume mounts (e.g. for maildir storage) to work seamlessly with docker-machine.

Installs MailHog in /usr/local/bin, which is in the system PATH and allows to use a simplified entrypoint (MailHog).

Installs ca-certificates, required for the "release message" feature.
With the current [mailhog/mailhog](https://hub.docker.com/r/mailhog/mailhog/)
docker image, releasing messages to an SMTP server via TLS fails:
> Failed to release message: x509: failed to load system roots and no roots
> provided

Removes any build dependencies after install, optimising docker image size.
The image size is about the same as the Rocker based build, but works with plain
Docker and can therefore be used via Docker Hub Automated Builds.

Runs with a non-privileged user account instead of as root, increasing security.
Assigning the user ID 1000 allows host volume mounts (e.g. for maildir storage)
to work seamlessly with docker-machine.

Installs MailHog in `/usr/local/bin`, which is in the system `PATH` and allows
to use a simplified entrypoint (`MailHog`).
@ian-kent
Copy link
Member

I like it 👍 thanks @blueimp

@ian-kent ian-kent merged commit e4fa51f into mailhog:master Nov 14, 2016
@blueimp
Copy link
Contributor Author

blueimp commented Nov 15, 2016

Thanks for merging! :)

@blueimp blueimp deleted the docker branch April 17, 2018 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants