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

User configuration option for enabling/disabling Docker Scout #323

Open
nightlark opened this issue Jan 15, 2025 · 1 comment
Open

User configuration option for enabling/disabling Docker Scout #323

nightlark opened this issue Jan 15, 2025 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@nightlark
Copy link
Collaborator

nightlark commented Jan 15, 2025

Users should be able to control whether or not the Docker Scout portion of the docker_image plugin attempts to run. This should be a configuration option that can be set using the surfactant config subcommand. I could see it either being called enable_docker_scout or disable_docker_scout, not really any preference for which one is nicer or more intuitive (but the default value when left unspecified can probably be true).

from surfactant.configmanager import ConfigManager
_config_manager = ConfigManager()
_enable_docker_scout = __config_manager.get("docker", "enable_docker_scout", True)

When the config option is set, it should short-circuit the check_docker_scout_installed and run_docker_scout functions, return immediately and for the latter return {} or None. The values in the class for self.disable_docker_scout = True are essentially locked to self.docker_scout_installed = False as a result of the former check being disabled.

The docker_image plugin itself should still try to run -- the new feature added in #247 will eventually be added to it.

We should also make sure to document the new configuration option (there should be a list with a few macho options elsewhere in the docs/README already. Perhaps even add a bit extra to the Docker Scout not installed warning saying "you can also get rid of this error and skip the check for docker scout by running surfactant config docker.disable_docker_scout true".

@nightlark nightlark added the enhancement New feature or request label Jan 15, 2025
@willis89pr
Copy link
Collaborator

#326

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants