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

Consider deprecating docker.host, docker.context, etc. settings #3539

Closed
bwateratmsft opened this issue May 31, 2022 · 7 comments · Fixed by #3555
Closed

Consider deprecating docker.host, docker.context, etc. settings #3539

bwateratmsft opened this issue May 31, 2022 · 7 comments · Fixed by #3555

Comments

@bwateratmsft
Copy link
Collaborator

bwateratmsft commented May 31, 2022

We're thinking about deprecating these settings, in favor of using VSCode's standard terminal.env.<os> option. I think that we would want to have a migration experience to help users get over to the new settings, as well as some documentation to describe how to set those.

VSCode will apply those environment variables automatically to all terminal windows, but we would need to pick up and apply the appropriate setting for any shell tasks that we execute behind-the-scenes.

@bwateratmsft
Copy link
Collaborator Author

/cc @chrmarti

@bwateratmsft
Copy link
Collaborator Author

bwateratmsft commented Jun 1, 2022

From telemetry data:

Config Source Percentage
Default context 97.3%
<unknown> 1.1%
DOCKER_HOST env var 0.6%
Custom context 0.6%
docker.host setting 0.3%
docker.context setting ~0%
DOCKER_CONTEXT env var ~0%

So the usage of these settings is extremely low.

@bwateratmsft bwateratmsft added this to the 1.23.0 milestone Jun 1, 2022
@bwateratmsft
Copy link
Collaborator Author

bwateratmsft commented Jun 10, 2022

@Tyriar had an alternative idea I think I like better. Instead of using terminal.integrated.env.<os>, define our own setting that accepts any key/value pairs, e.g.:

"containers.envVariables": {
    "DOCKER_HOST": "...",
    "SOME_VAR": "SOME_VALUE"
}

We can apply this setting to ExtensionContext.environmentVariableCollection, as well as any shells we create in the background.

@chrmarti
Copy link

I assume that could contain env variables for several CLIs? (E.g., Docker and Podman.)

@bwateratmsft
Copy link
Collaborator Author

Yes, I think we would make it accept any environment variables, so that we don't have to chase many runtimes' particular environment variables.

@bwateratmsft
Copy link
Collaborator Author

Associated docs PR: microsoft/vscode-docs#5488

@bwateratmsft bwateratmsft removed their assignment Jul 25, 2022
@microsoft microsoft locked and limited conversation to collaborators Sep 4, 2022
@bwateratmsft
Copy link
Collaborator Author

This has now been released in Docker extension version 1.23.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants