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

optimize docker image size #76

Merged
merged 1 commit into from
Mar 13, 2016
Merged

optimize docker image size #76

merged 1 commit into from
Mar 13, 2016

Conversation

missedone
Copy link
Contributor

this PR is to optimize the mailhog/MailHog docker image size by building with Rocker tool.
Originally, the image size is around 600MB:

mailhog/mailhog          latest              554462932cb7        4 months ago        597.2 MB

Now, it's around 39MB:

mailhog/mailhog          latest              da5b63429efc        49 seconds ago       38.98 MB

please follow instructions to install Rocker first, then you can build as simple as:

rocker build

@@ -0,0 +1,14 @@
# build image
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the magic of Rocker is we can separate the build and runtime image.
the build image container all resource or dependencies required at build time.
once the build success, copy it to the runtime image which based on alpine.
so the final image is alpine + MailHog executable binary.

@missedone
Copy link
Contributor Author

hi @ian-kent

could you have a look at this PR, the travis build failure was fixed in PR #77

@ian-kent ian-kent merged commit 805a187 into mailhog:master Mar 13, 2016
@ian-kent
Copy link
Member

awesome 👍 thanks @missedone!

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.

3 participants