feat: Add Docker image for pngcrush with optimized settings#505
feat: Add Docker image for pngcrush with optimized settings#505Balou9 wants to merge 4 commits intoFerretDB:mainfrom
Conversation
| @@ -0,0 +1,10 @@ | |||
| FROM alpine:3.18 | |||
There was a problem hiding this comment.
I was unsure which version to use. Thought full semantic versions for base images are good for reproducibility. It makes more sense to use the latest image 3.22, right?!
| RUN apk update && \ | ||
| apk add --no-cache pngcrush \ | ||
| rm -rf /var/cache/apk/* |
There was a problem hiding this comment.
Why do we need both --no-cache and update + rm?
There was a problem hiding this comment.
rm removes any remaining package cache files from the /var/cache/apk directory. Even with --no-cache, some temporary files or metadata might persist, or if apk update was run, its fetched index files would be present. This rm command ensures a thorough cleanup, further reducing the final image size
ferretdb-pngcrush/Dockerfile
Outdated
| WORKDIR /workdir | ||
|
|
||
| ENTRYPOINT ["/usr/bin/pngcrush"] | ||
| CMD ["-ow", "-brute", "-reduce", "-rem", "allb"] No newline at end of file |
There was a problem hiding this comment.
I am not sure if we really need this. It was an attempt to check every possible parameter to reduce file size or in this case remove all ancillary (non-essential) chunks/metadata.
This pull request introduces a new Dockerfile for pngcrush.
First step for FerretDB/FerretDB#4637
Issues
Improvements