Genivia / ugrep

NEW ugrep 6.5: a more powerful, ultra fast, user-friendly, compatible grep. Includes a TUI, Google-like Boolean search with AND/OR/NOT, fuzzy search, hexdumps, searches (nested) archives (zip, 7z, tar, pax, cpio), compressed files (gz, Z, bz2, lzma, xz, lz4, zstd, brotli), pdfs, docs, and more
https://ugrep.com
BSD 3-Clause "New" or "Revised" License
2.57k stars 109 forks source link

Refactor Dockerfile for optimized build speed and image size #322

Closed PeterDaveHello closed 9 months ago

PeterDaveHello commented 9 months ago

By properly handling the layers and temp, the image size and build speed are significantly improved!

Here's the size change before and after the optimization:

REPOSITORY          TAG                  IMAGE ID       CREATED         SIZE
ugrep               after                8809a59b7579   8 days ago      548MB
ugrep               before               d329eedc0405   8 days ago      1.07GB
genivia-inc commented 9 months ago

Very nice. Thank you!

genivia-inc commented 9 months ago

I will rename your new Dockerfile to Dockerfile-minimized and keep the old Docketfile so people can still use the full Dockerfile. The old Dockerfile is useful when editing the source and rebuilding the source code to do some tests and for debugging, and when the ugrep/tests files are still needed. Also vim, wget and unzip should not be needed in a minimized container.