Skip to content

Feature request: more efficient elasticsearch docker image #50838

Closed
@JorritSalverda

Description

@JorritSalverda

Describe the feature:

When calculating the efficiency score of the elasticsearch 7.4.0 image with https://github.com/wagoodman/dive the image receives a very bad score of 81% efficiency and a potential wasted space of 305MB.

The wasted space includes files like

Total Space  Path
35   MB  /var/lib/rpm/Packages
11   MB  /usr/bin/ld.gold
 6.4 MB  /usr/bin/dwp
 5.1 MB  /usr/lib/locale/locale-archive
 5.0 MB  /usr/lib64/libcrypto.so.1.0.2k
 4.3 MB  /usr/lib64/libc-2.17.so
 3.7 MB  /usr/lib64/libdb-5.3.so
 3.7 MB  /usr/lib64/libpython2.7.so.1.0
 3.5 MB  /var/lib/rpm/Providename

For which it's questionable whether they're used at runtime. Perhaps the image can be made more efficient by moving all the COPY steps to the top, combining all the RUN statements (resulting in 1 layer) and cleaning unused files added during the RUN steps.

You can run the analysis with the following commands:

brew install dive
dive docker.elastic.co/elasticsearch/elasticsearch:7.4.0

Metadata

Metadata

Assignees

Labels

:Delivery/PackagingRPM and deb packaging, tar and zip archives, shell and batch scriptsTeam:DeliveryMeta label for Delivery team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions