Skip to content

Commit

Permalink
Replace mime-support with media-types
Browse files Browse the repository at this point in the history
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
  • Loading branch information
kruskall committed Jul 12, 2022
1 parent d0043d7 commit 156578e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ FROM ubuntu:22.04

# Get dependencies
RUN apt-get update && \
apt-get install -y mime-support zip rsync curl && \
apt-get install -y media-types zip rsync curl && \
apt-get clean all

# Move binary from the builder image
Expand Down

0 comments on commit 156578e

Please sign in to comment.