Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ updates:
- package-ecosystem: "docker"
directories:
- "/docusaurus-docs"
- "/ferretdb-pngcrush"
- "/ferretdb-prettier"
- "/ferretdb-reprepro"
- "/ferretdb-textlint"
Expand Down
10 changes: 10 additions & 0 deletions ferretdb-pngcrush/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM alpine:3.18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why that version?

Copy link
Author

@Balou9 Balou9 Aug 1, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/*
Comment on lines +3 to +5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need both --no-cache and update + rm?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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


WORKDIR /workdir

ENTRYPOINT ["/usr/bin/pngcrush"]
CMD ["-ow", "-brute", "-reduce", "-rem", "allb"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need allb?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.