Skip to content

Improve Image Size #131

@dev-rke

Description

@dev-rke

I recommend to apply some optimizations to reduce image size.

  • combine all RUN commands into a single RUN command to reduce overlayfs layers to speed up I/O (example)
  • remove unused packages (are linux headers or g++ really used after image creation?)
  • clean temporary folders (e.g. apt clean)

Another optimization might be to create a separate builder stage, build everything there and copy only the results into a new python image - but that may take some more time to implement.

Further best practices may be found here:
https://docs.docker.com/build/building/best-practices/#choose-the-right-base-image

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions