microsoft / vscode-docker

Docker Extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=ms-azuretools.vscode-docker
Other
1.18k stars 508 forks source link

Docker Terminal issue in new versions of VSCode #4320

Closed aandraderosa closed 2 weeks ago

aandraderosa commented 3 weeks ago

Type: Bug

(Text translated by Google Translate) In versions of Vscode from version 1.66.2 onwards, when I enter the Docker extension in Vscode, and click on a container with the right mouse button and go to "Attach Shel", when opening the docker terminal the docker terminal no longer appears. path of the folder/directory I am in, only the sign is blinking, without the path of the root folder/directory. In previous versions of Vscode (such as version 1.66.2), when I open this Docker terminal, the path to the root folder/directory that will be given the commands appears. I have already uninstalled the new version, and installed version 1.66.2, and it works normally, but versions from that mentioned above do not work. Help me please!

(Texto original, no idioma original) Nas versões do Vscode a partir da versão 1.66.2, quando entro na extensão do Docker no Vscode, e clico em um container com o botão direito do mouse e vou em "Attach Shel", ao abrir o terminal do docker não aparece mais o caminho da pasta/diretorio em que estou, só fica a sinalização piscando, sem caminho de pasta/diretorio raiz. Já nas versões anteriores do Vscode (como a versão 1.66.2) quando abro esse terminal do Docker aparece o caminho da pasta/diretorio raiz que será dado os comandos. Já desinstalei a versão nova, e instalei a versão 1.66.2, e funciona normalmente nela, mas versões a partir dessa supracitada, não funciona. ME ajude por favor!

Extension version: 1.29.1 VS Code version: Code 1.90.0 (89de5a8d4d6205e5b11647eb6a74844ca23d2573, 2024-06-04T19:33:54.889Z) OS version: Windows_NT x64 10.0.22631 Modes:

System Info |Item|Value| |---|---| |CPUs|12th Gen Intel(R) Core(TM) i7-12700H (20 x 2688)| |GPU Status|2d_canvas: enabled
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled| |Load (avg)|undefined| |Memory (System)|31.71GB (12.84GB free)| |Process Argv|--open-url --crash-reporter-id 9374467d-9f9e-4969-a357-dac0d0ae8de7 --crash-reporter-id 9374467d-9f9e-4969-a357-dac0d0ae8de7 -- vscode:extension/MS-CEINTL.vscode-language-pack-pt-BR| |Screen Reader|no| |VM|0%|
A/B Experiments ``` vsliv368:30146709 vspor879:30202332 vspor708:30202333 vspor363:30204092 vscod805cf:30301675 binariesv615:30325510 vsaa593cf:30376535 py29gd2263:31024239 c4g48928:30535728 azure-dev_surveyone:30548225 962ge761:30959799 pythongtdpath:30769146 welcomedialogc:30910334 pythonidxpt:30866567 pythonnoceb:30805159 asynctok:30898717 pythontestfixt:30902429 pythonregdiag2:30936856 pythonmypyd1:30879173 pythoncet0:30885854 h48ei257:31000450 pythontbext0:30879054 accentitlementsc:30995553 dsvsc016:30899300 dsvsc017:30899301 dsvsc018:30899302 cppperfnew:31000557 dsvsc020:30976470 pythonait:31006305 jchc7451:31067544 showvideot:31016892 chatpanelc:31048052 dsvsc021:30996838 bdiig495:31013172 pythoncenvpt:31062603 a69g1124:31058053 dvdeprecation:31068756 pythonprt:31056678 dwnewjupytercf:31046870 26j00206:31048877 ```
aandraderosa commented 3 weeks ago

Conseguir resolver, então vou ensinar aqui para quem tiver mesmo problema. 1 - Com o VSCode aberto aperte simultaneamente as teclas "Ctrl" e "," (ou vá para Arquivo > Preferências > Configurações). 2 - Na barra de pesquisa na parte superior, digite: "docker.commands.attach" (sem as aspas). 3 - Você verá uma configuração chamada "Docker: Attach". Clique no link "Editar em settings.json" ao lado dela, para abrir o arquivo "settings.json". 4 - No arquivo "settings.json", localize a linha que começa com "docker.commands.attach". 5 - Altere o valor dessa configuração para "${containerCommand} exec -it ${containerId} bash". (que substitui o "${shellCommand}" por "bash"). 6 - Salve o arquivo "settings.json" e feche-o. Pronto! Está corrigido!


(Text translated by Google Translate) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''! I can solve it, so I'll teach it here for anyone who has the same problem. 1 - With VSCode open, simultaneously press the "Ctrl" and "," keys (or go to File > Preferences > Settings). 2 - In the search bar at the top, type: "docker.commands.attach" (without the quotes). 3 - You will see a setting called "Docker: Attach". Click the "Edit in settings.json" link next to it to open the "settings.json" file. 4 - In the "settings.json" file, locate the line that begins with "docker.commands.attach". 5 - Change the value of this setting to "${containerCommand} exec -it ${containerId} bash". (which replaces "${shellCommand}" with "bash"). 6 - Save the "settings.json" file and close it. Ready! It's corrected!

fiveisprime commented 2 weeks ago

Sounds like you've got this all worked out so I'm going to close this. Re-open it if you are still having an issue. Thanks!