Skip to content

Optimise the Dockerfile for Docker Hub Automated Builds.#118

Merged
ian-kent merged 1 commit intomailhog:masterfrom
blueimp:docker
Nov 14, 2016
Merged

Optimise the Dockerfile for Docker Hub Automated Builds.#118
ian-kent merged 1 commit intomailhog:masterfrom
blueimp:docker

Conversation

@blueimp
Copy link
Copy Markdown
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
Copy Markdown
Member

I like it 👍 thanks @blueimp

@ian-kent ian-kent merged commit e4fa51f into mailhog:master Nov 14, 2016
@blueimp
Copy link
Copy Markdown
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