-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Open Docker terminal from Terminal #4892
Comments
You’d be better served by just adding a new profile whose commandline is “docker exec -t -i container /process". Even if terminal guessed what shell you wanted inside a random container, it wouldn’t be very reliable and people would hate the autogenerating profiles for each one 😄 You know your containers a lot better than we ever could! |
Thanks, however, for the request! |
@jmsnavarro I have a script in my Ubuntu WSL distro for generating these profiles. I created it as an experiment. I am not sure what the practical purpose of wanting these profiles is, but you could copy and edit this t accomplish what you want. If you do not have VALUE=$(docker ps --format '{{ json . }}' | jq '{"name": ("Docker " + .Names + " " + .Image), "guid": ("{0974efce-f787-4a0a-8468-"+.ID+"}"), "hidden": false, "commandline": ("docker exec -it " + .Names + " /bin/bash")}' | jq -s .)
cat /mnt/c/Users/Joshua/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json \
| jq '.profiles.list=([.profiles.list[] | select(.name | contains("Docker") | not)] + '$VALUE')' \
> /mnt/c/Users/Joshua/AppData/Local/Packages/Microsoft.WindowsTerminalPreview_8wekyb3d8bbwe/LocalState/settings.json Once #7584/#7632 is done, you could leave comments in place and just direct the first line into a file instead of a variable. |
Open a Docker-hosted terminal directly using Windows Terminal
Proposed technical implementation details
The text was updated successfully, but these errors were encountered: