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

Use alpine to reduce image size #344

Merged
merged 2 commits into from
Jul 15, 2021
Merged

Use alpine to reduce image size #344

merged 2 commits into from
Jul 15, 2021

Conversation

mtsmfm
Copy link
Contributor

@mtsmfm mtsmfm commented Jul 4, 2017

@spaquet
Copy link

spaquet commented Aug 7, 2017

Here you are https://github.com/spaquet/alpinemailcatcher to about ~36MB...

@vojkny
Copy link

vojkny commented May 2, 2019

can we merge this? this would be very helpful

Removes the ~180mb of build tools from the final image.
@sj26
Copy link
Owner

sj26 commented Jul 15, 2021

I've rebased this so that it's using ruby 2.7.

In my testing using dive build, this creates a 186MB layer, then a 15 MB layer:

image

Further optimising to install build tools, install mailcatcher, then remove build tools in a single command results in only a 16MB layer:

image

@sj26
Copy link
Owner

sj26 commented Jul 15, 2021

Thanks!

@sj26 sj26 merged commit 4d426e8 into sj26:main Jul 15, 2021
@sj26
Copy link
Owner

sj26 commented Jul 15, 2021

The docker image has been updated to use alpine, and now clocks in at ~25MB total, only 5.85MB (compressed) of that is a unique layer for mailcatcher.

https://hub.docker.com/layers/sj26/mailcatcher/latest/images/sha256-ea9cc63aaceb360b5bc3c5d3a090e0d69905b2b5e3eaf2d4e7b311bed9cfbe0e?context=repo

I've also pushed both linux/arm64 and linux/amd64 images.

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.

4 participants