-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Description
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