docker / roadmap

Welcome to the Public Roadmap for All Things Docker! We welcome your ideas.
https://github.com/orgs/docker/projects/51
Creative Commons Zero v1.0 Universal
1.74k stars 255 forks source link

Open different terminal from Docker Desktop on Windows #212

Open nebuk89 opened 3 years ago

nebuk89 commented 3 years ago

Tell us about your request When clicking the Cli button the default terminal should open the shell session for Windows users

Which service(s) is this request for? Docker Desktop on Windows

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? Today customers have preferred terminals to work in which are setup to work for them, the desktop UI today opens the built in terminal for the machine not the users current default terminal.

Are you currently working around the issue? Using the new MSFT terminal and not using the button in Desktop UI

Additional context:

Mac ticket: https://github.com/docker/roadmap/issues/98

Kazmirchuk commented 3 years ago

+1 this would be very handy, especially for novice users of Docker

stephen-turner commented 3 years ago

NB It looks like Microsoft will be introducing the notion of a "default terminal" into Windows: microsoft/terminal#492. I haven't seen an official statement, but I'm guessing it will land in 21H2.

skaliush commented 3 years ago

+1

dustypomerleau commented 3 years ago

+1 on this. If you use the integrated terminal on an editor, like VS Code, but you also have iTerm2 installed, Docker Desktop will launch iTerm2, regardless of any settings. Thanks.

YiuTerran commented 2 years ago

+1

dmelinosky commented 2 years ago

This would be great +1

MatthewOrganic commented 2 years ago

+1

Jerryporter commented 2 years ago

+1

hichemfantar commented 2 years ago

NB It looks like Microsoft will be introducing the notion of a "default terminal" into Windows: microsoft/terminal#492. I haven't seen an official statement, but I'm guessing it will land in 21H2.

It'd be preferable not to rely on windows default terminal because that's only customizable in w11. W10 users don't have that luxury. It'd be better to be able to manually tell docker desktop our preferred terminal app.

gerneio commented 2 years ago

4.12.0 just released and initially I thought it had this feature based on the release notes, but rather it was a feature for an "embedded" terminal within docker desktop itself, which is still pretty cool. So looks like we are close to getting this added, just need an option under the "Choose container terminal" docker desktop setting that does exactly that and lets you specify the system terminal to open. Either a free entry textbox that allows you to fill in the command to pass along to the auto-generated "docker exec" command or a dropdown of system defaults, similar to how the new windows terminal does it when opening its startup settings.

image

image

thoni56 commented 1 year ago

Although I wouldn't mind the automation, a much more easy stop-gap would be to allow copying of the docker command to use. I'm imagining a copy symbol just beside the "open in external terminal" which puts "docker exec ......" in to the clipboard.

Then I can just open my favourite terminal and paste.

This would work on all platforms (partly) solving also #395.

joe0BAB commented 1 year ago

Hi everyone here! I know this doesn't solve the feature request, but we are working on a new command that will make getting a shell into any container much easier. As of now, this isn't part of core Docker Desktop yet but distributed as an extension: Docker Labs Debug Tools

In short, with this you can do:

dld shell <your container or image>

I.e., it will give an easy to remember / short command that you can use from any terminal you want and will give you a shell into any image or container (including stopped), local or remote.

Related roadmap issue: #524

Any feedback appreciated!

gerneio commented 1 year ago

@joe0BAB would this be something integrated into the docker desktop UI? I think that was the goal from the OP (and also what I'm looking for). In short, if we had the ability to specify the custom command that is opened/copied from docker desktop so we can then specify our preferred terminal, that would be great.

joe0BAB commented 1 year ago

@gerneio yes, eventually the idea is to integrate this new functionality that comes with the "Docker Labs Debug Tools" extension with the UI too

thoni56 commented 1 year ago

And eventually that would become a shell command? Something like

docker shell <container or image>

I like that.

hichemfantar commented 1 year ago

Looks like the latest w10 Windows Terminal release allows you to set windows terminal as your default which means Docker Desktop should open up windows Terminal if it's your default. image

benitogf commented 1 year ago

@hichemfantar tested and works on: image image

👍

joe0BAB commented 7 months ago

Small heads up: There now is a new docker command

docker debug <image or container>

It allows you to get a debug shell (bash/fish/zsh) into any container or image. I know this doesn't solve the initial feature request. However, it might be a good enough workaround for some people here. Assuming you already are in the terminal of your choice,docker debug now is a far more convenient way to shell into containers (think replacement of docker exec -it <container> sh but with way more features). It even works for stopped containers and images.

See official docs for details (requires Docker Desktop >= 4.27).

Daviid-P commented 6 months ago

Is this actually solved as benitogf claims?

I have the default set to Windows Terminal inside Terminal > Configuration > Default Terminal Application but regardless of what I set in Docker Desktop Settings, Integrated or System Default I get the same plain CMD windows with docker exec -it ........ as the title.

Open in external terminal and the button next to the stop button do the same thing.

You're up to date

Docker Desktop 4.28.0 (139021) is currently the newest version available.