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

dockerfile: replace mime-support with media-types #846

Merged
merged 1 commit into from
Jul 14, 2022

Conversation

kruskall
Copy link
Member

mailcap was added back when the image was using centOS to add
/etc/mime.types.

See #599

Later, the package registry moved to Ubuntu LTS and mailcap was
replaced by mime-support which also installs mailcap.

Now mime-support is a transitional package and we can replace it with
media-types, to only install the file (/etc/mime.types) that we need.

The issue with mailcap is the large dependency tree and the dependency
on perl, by replacing mime-support with media-types we can reduce the
image size.

Before: 202MB
After: 148MB

@elasticmachine
Copy link

elasticmachine commented Jul 12, 2022

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-07-12T21:48:05.617+0000

  • Duration: 5 min 5 sec

Test stats 🧪

Test Results
Failed 0
Passed 207
Skipped 0
Total 207

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

mailcap was added back when the image was using centOS to add
/etc/mime.types.

See elastic#599

Later, the package registry moved to Ubuntu LTS and mailcap was
replaced by mime-support which also installs mailcap.

Now mime-support is a transitional package and we can replace it with
media-types, to only install the file (/etc/mime.types) that we need.

The issue with mailcap is the large dependency tree and the dependency
on perl, by replacing mime-support with media-types we can reduce the
image size.

Before: 202MB
After: 148MB
@kruskall kruskall changed the title Replace mime-support with media-types dockerfile: replace mime-support with media-types Jul 12, 2022
@kruskall kruskall force-pushed the fix/replace-mime-support branch from 156578e to 8debc16 Compare July 12, 2022 21:47
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks! Good one.

@jsoriano jsoriano merged commit 3f25707 into elastic:main Jul 14, 2022
@kruskall kruskall deleted the fix/replace-mime-support branch July 14, 2022 10:42
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