[GH-ISSUE #265] Feature request: Ignore files by filter file #112

Closed
opened 2026-06-08 11:25:44 +03:00 by zhus · 4 comments
Owner

Originally created by @windymelt on GitHub (Sep 13, 2022).
Original GitHub issue: https://github.com/bootandy/dust/issues/265

Hi, I started using this nice tool from today. It seems like very good.

Then I found that there is no option to provide ignore list via a file. (Yes, of course I can ignore file/directory via -v option directly one by one)

My use case is:

  • I'm building Docker image
  • Build is heavy; seems like there is redundant files included inside docker context
  • I can remove files/directories from docker context via .dockerignore (same format as .gitignore)
  • So I'm going to find big files not listed in .dockerignore

As wrote above, I need feature that ignore files/directories listed in some filter file.

If this tool have this option, that's fantastic.

Alternative solution

I have workaround

cat .dockerignore | sed -e 's/^\(.*\)$/-v \1/' | xargs dust
Originally created by @windymelt on GitHub (Sep 13, 2022). Original GitHub issue: https://github.com/bootandy/dust/issues/265 Hi, I started using this nice tool from today. It seems like very good. Then I found that there is no option to provide ignore list via a file. (Yes, of course I can ignore file/directory via `-v` option directly one by one) My use case is: - I'm building Docker image - Build is heavy; seems like there is redundant files included inside docker context - I can remove files/directories from docker context via `.dockerignore` (same format as `.gitignore`) - So I'm going to find big files not listed in `.dockerignore` As wrote above, I need feature that ignore files/directories listed in some filter file. If this tool have this option, that's fantastic. ## Alternative solution I have workaround ```shell cat .dockerignore | sed -e 's/^\(.*\)$/-v \1/' | xargs dust ```
zhus closed this issue 2026-06-08 11:25:44 +03:00
Author
Owner

@bootandy commented on GitHub (Oct 1, 2022):

there's no option to do that currently, I'll leave this open and I might look at it in the future.

<!-- gh-comment-id:1264315544 --> @bootandy commented on GitHub (Oct 1, 2022): there's no option to do that currently, I'll leave this open and I might look at it in the future.
Author
Owner

@Philipp-M commented on GitHub (Aug 17, 2023):

Just stumbled over this, having the option to use .ignore files (whether that would be .gitignore or .dockerignore) would be great (e.g. to get the size statistics for a git repo)

Maybe use the ignore crate with a WalkBuilder for that?

<!-- gh-comment-id:1682655201 --> @Philipp-M commented on GitHub (Aug 17, 2023): Just stumbled over this, having the option to use `.ignore` files (whether that would be `.gitignore` or `.dockerignore`) would be great (e.g. to get the size statistics for a git repo) Maybe use the `ignore` crate with a `WalkBuilder` for that?
Author
Owner

@bootandy commented on GitHub (Dec 14, 2023):

Earlier versions did use WalkBuilder and the ignore crate but they were much slower.

<!-- gh-comment-id:1854789512 --> @bootandy commented on GitHub (Dec 14, 2023): Earlier versions did use WalkBuilder and the ignore crate but they were much slower.
Author
Owner

@bootandy commented on GitHub (Jan 4, 2024):

will be added in new version:
https://github.com/bootandy/dust/pull/358

<!-- gh-comment-id:1876045970 --> @bootandy commented on GitHub (Jan 4, 2024): will be added in new version: https://github.com/bootandy/dust/pull/358
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#112