Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multiple 'default' contexts for Docker #283

Merged
merged 2 commits into from
Apr 23, 2022
Merged

Support multiple 'default' contexts for Docker #283

merged 2 commits into from
Apr 23, 2022

Conversation

halostatue
Copy link
Contributor

Description

If someone is using 'colima' instead of Docker Desktop, the default context is 'colima'. Rather than making two tests with fixed values, add a new configuration variable and use contains.

Motivation and Context

I use colima and don't want the colima context to show, because it's equivalent to the default context.

However, rather than hardcoding colima, I’ve extended this to have a list of excluded contexts.

How Has This Been Tested

I tested with make test.

  • I have tested using Linux.
  • I have tested using MacOS.

Checklist

  • I have updated the documentation accordingly.
    • There is no explicit documentation for this, so I’m not sure where to put it. Documenting the variable tide_docker_default_contexts (which does include colima) would be appropriate in some way.
  • I have updated the tests accordingly.

If someone is using 'colima' instead of Docker Desktop, the default
context is 'colima'. Rather than making two tests with fixed values,
add a new configuration variable and use `contains`.
@IlanCosman
Copy link
Owner

Thanks for the PR Austin 🙂 I'm certainly willing to not display on colima.

However, I'm debating the value of adding this as a configuration knob. Is this actually something you think people might be likely to change? It's not that I'm particularly averse to this exact knob, but rather if we introduced a knob for every little thing that maybe, someday, one person might want to change, it would get unreasonable rather quickly 😄

@halostatue
Copy link
Contributor Author

I understand the reluctance to make a configuration knob. However, in this case, I think that it’s necessary. I’m currently using Colima, but I want to play with podman and rancher desktop, which may create / use different contexts. As we discover these, we can add another context to exclude by default (if necessary), but that starts to get a little silly (IMO).

@IlanCosman IlanCosman merged commit 26f1a8d into IlanCosman:main Apr 23, 2022
@IlanCosman
Copy link
Owner

Thanks for the contribution 🙂

@halostatue halostatue deleted the docker-default-contexts branch April 24, 2022 03:56
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 30, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants