Skip to content

config: support excluding images in environment variable.#170

Open
gabay wants to merge 1 commit into
sergi0g:mainfrom
gabay:feature/exclude-image-in-env-var
Open

config: support excluding images in environment variable.#170
gabay wants to merge 1 commit into
sergi0g:mainfrom
gabay:feature/exclude-image-in-env-var

Conversation

@gabay

@gabay gabay commented Jun 4, 2026

Copy link
Copy Markdown

NOTE: I read your note about pausing cup development. this PR is of no urgency whatsoever.

I came across a need to ignore just one image, and didn't want to create a config file just for that

example use in docker compose file - ignore postgres:16 and postgres:17 images:

cup:
        ...
        environment:
            CUP_IMAGES_EXCLUDE: postgres:16,postgres:17

@sergi0g

sergi0g commented Jun 8, 2026

Copy link
Copy Markdown
Owner

Hey @gabay, thanks for taking the time to create this PR! I'm finally done with my final exams, so I hope to start working on Cup again soon (in addition to some other projects) and I'll probably completely rewrite it. I don't know if that will ever succeed or when, so I think we should get this merged.

From my first really quick review (I'm not on my computer right now, sorry), I'll say the following:

  • I think it may be better to separate references with spaces, so somebody reading a compose can easily see where one reference ends and the other begins instead of trying to find commas in a (probably) large blob of text. This should tolerate multiple spaces between references too, as it is easy for one to accidentally slip through.
  • It seems your formatter may have changed a few things in other files too. I'd ideally like only functional changes in this PR. I normally format everything with cargo fmt.

I'll do a more thorough review later. It'd be great if you could fix these in the meantime!

@gabay gabay force-pushed the feature/exclude-image-in-env-var branch from bccd628 to cab6594 Compare June 8, 2026 22:20
@gabay gabay force-pushed the feature/exclude-image-in-env-var branch from cab6594 to b429d6c Compare June 8, 2026 22:26
@gabay

gabay commented Jun 8, 2026

Copy link
Copy Markdown
Author

thanks for replying, I hope the exams went as well as could be :)

  • Removed all non-relevant changes (except the ability to debug-print the config - I find it extremely useful).
  • Changed the format to be space-separated instead of comma-separated.
  • tried cargo fmt but it's misbehaving, sorry in advance if I missed something.

BTW - I used AI to create the initial draft for tis PR. IDK what's your take on it, I prefer to be clear about that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants