%3CLINGO-SUB%20id%3D%22lingo-sub-1883237%22%20slang%3D%22en-US%22%3ESet%20up%20Azure%20Shell%20locally%20-%20part%202%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1883237%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Folks%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20my%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fitops-talk-blog%2Fhow-to-setup-and-run-azure-cloud-shell-locally%2Fba-p%2F1840528%3FWT.mc_id%3Dmodinfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Elast%20post%3C%2FA%3E%20I%20discussed%20how%20you%20can%20run%20the%20managed%20image%20that%20the%20Azure%20Cloud%20Shell%20is%20based%20on%20locally.%26nbsp%3B%20It%20allows%20you%20to%20leverage%20the%20Azure%20Shell%20managed%20environment%20without%20being%20subject%20to%20the%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fazure%2Fcloud-shell%2Ftroubleshooting%3FWT.mc_id%3Dmodinfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Elimitations%20of%20the%20real%20Azure%20Cloud%20Shell%3C%2FA%3E.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFollowing%20that%20post%2C%20someone%20said%20to%20me%2C%20%E2%80%9C%3CEM%3EYou%20forgot%20that%20online%20you%20can%20use%20code%20(Cloud%20Shell%20editor)%3C%2FEM%3E%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWell.%26nbsp%3B%20Yes%20and%20no%E2%80%A6%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ELet%20me%20elaborate%E2%80%A6%20No%2C%20you%20cannot%20use%20the%20same%20Code%20version%20in%20the%20shell.%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture1.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233340i95CB5ABFF5837E4A%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture1.png%22%20alt%3D%22Picture1.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EHowever%2C%20there%20is%20a%20great%20way%20to%20use%20the%20container%20version%20WITH%20the%20full%20%3CA%20href%3D%22https%3A%2F%2Fcode.visualstudio.com%2F%3FWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%20Code%3C%2FA%3E.%20%26nbsp%3B%26nbsp%3BI%20must%20admit%20that%20I%20MUCH%20prefer%20it%20this%20way.%20Mostly%20because%20I%20can%20use%20all%20the%20extensions%20in%20VS%20Code%20that%20make%20my%20life%20easier.%26nbsp%3B%20Extensions%20like%3A%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3DDavidAnson.vscode-markdownlint%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EMarkdownlint%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-vscode.PowerShell%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EPowerShell%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dmsazurermtools.azurerm-vscode-tools%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Resource%20Manager%20(ARM)%20Tools%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-vscode.azurecli%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20CLI%20Tools%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-azuretools.vscode-azureterraform%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Terraform%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-azuretools.vscode-azurevirtualmachines%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Virtual%20Machines%3C%2FA%3E%3C%2FLI%3E%0A%3CLI%3E%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-vscode.azure-account%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EAzure%20Account%3C%2FA%3E%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ETo%20name%20a%20few.%3C%2FP%3E%0A%3CP%3EHere%E2%80%99s%20how%20I%20set%20that%20up%2C%20so%20I%20get%20the%20best%20of%20both%20worlds.%26nbsp%3B%20A%20managed%20Cloud%20Shell%20environment%20and%20a%20local%20powerful%20code%20editor.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId-1289613903%22%20id%3D%22toc-hId-1289613897%22%3EConnecting%20to%20VS%20Code%20to%20the%20Running%20container%3C%2FH3%3E%0A%3CP%3ESo%2C%26nbsp%3B%20we%20already%20covered%20how%20we%20setup%20and%20start%20the%20container%20in%20the%20%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fitops-talk-blog%2Fhow-to-setup-and-run-azure-cloud-shell-locally%2Fba-p%2F1840528%3FWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%22%3Elast%20post%3C%2FA%3E.%20Now%20to%20connect%20VS%20Code%20to%20the%20container%20we%20need%20to%20get%20one%20more%20extension.%26nbsp%3B%20The%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3Dms-vscode-remote.remote-containers%26amp%3BWT.mc_id%3DModInfra-10876-pierrer%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%3CSTRONG%3ERemote%20-%20Containers%3C%2FSTRONG%3E%26nbsp%3Bextension%3C%2FA%3E%20lets%20you%20use%20a%26nbsp%3BDocker%20container%26nbsp%3Bas%20a%20full-featured%20environment.%20%26nbsp%3BTo%20quickly%20swap%20between%20different%2C%20isolated%20development%20environments%20and%20safely%20make%20updates%20without%20worrying%20about%20impacting%20your%20local%20machine.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture2.png%22%20style%3D%22width%3A%20936px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233341i9C36A50CDD8DD664%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture2.png%22%20alt%3D%22Picture2.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOnce%20it%E2%80%99s%20installed%2C%20I%20press%20F1%20to%20bring%20up%20the%20Command%20Palette%20and%20type%20in%20Remote-Containers%20for%20a%20full%20list%20of%20commands.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture3.png%22%20style%3D%22width%3A%20936px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233342iFCC22DF2CC159A27%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture3.png%22%20alt%3D%22Picture3.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20click%20on%20the%20Remote%20%22Quick%20Access%22%20status%20bar%20item%20to%20get%20a%20list%20of%20the%20most%20common%20commands.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture4.png%22%20style%3D%22width%3A%20342px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233343i8300780813826FA0%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture4.png%22%20alt%3D%22Picture4.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20the%20Command%20Palette%20select%20%E2%80%9CRemote-Containers%3A%20Attach%20to%20Running%20Container%E2%80%A6%E2%80%9D%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture5.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233344iCEFA666E8FD388A7%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture5.png%22%20alt%3D%22Picture5.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EA%20list%20of%20running%20containers%20will%20be%20presented%20and%20I%20select%20the%20one%20that%E2%80%99s%20running%20my%20%E2%80%9CLocal%20Cloud%20Shell%E2%80%9D.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture6.png%22%20style%3D%22width%3A%20758px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233346i7D6B34A7C30B5654%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture6.png%22%20alt%3D%22Picture6.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIt%20will%20ten%20connect%20to%20the%20container%20environment.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture7.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233347iFF56D17D1DBA5C43%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture7.png%22%20alt%3D%22Picture7.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CH3%20id%3D%22toc-hId--517840560%22%20id%3D%22toc-hId--517840566%22%3EConnecting%20to%20the%20mapped%20folder%20inside%20the%20container%3C%2FH3%3E%0A%3CP%3EConnecting%20to%20the%20mapped%20folder%20is%20as%20easy%20as%20opening%20a%20folder%20and%20navigating%20to%20the%20folder%20in%20the%20container%20mapped%20to%20the%20local%20location.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22vscode-folder.gif%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233348i2AE44793335821A8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22vscode-folder.gif%22%20alt%3D%22vscode-folder.gif%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20last%20piece%20of%20this%20puzzle%20is%20the%20terminal.%20Because%20I%E2%80%99m%20connected%20to%20the%20container%2C%20I%20have%20access%20to%20all%20the%20environments%20that%20are%20setup%20in%20there.%20By%20selecting%20%E2%80%98Terminal%E2%80%99%20from%20the%20%E2%80%98view%E2%80%99%20menu%20I%20can%20open%20the%20default%20environment%20which%20is%20a%20bash%20shell.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EBut%20I%20can%20easily%20open%20a%20PowerShell%20terminal%20by%20selecting%20%E2%80%9CSelect%20Default%20Shell%E2%80%9D%20in%20the%20terminal%20shell%20selection%20drop%20down.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture8.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233349iD3C00E4D89175B8C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture8.png%22%20alt%3D%22Picture8.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20selecting%20the%20PowerShell%20Core%20environment%20setup%20in%20the%20image%20of%20the%20cloud%20shell.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture9.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233350i955163855623454C%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture9.png%22%20alt%3D%22Picture9.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAnd%20finally%2C%20starting%20a%20new%20terminal%20either%20by%20selecting%20%E2%80%98New%20Terminal%E2%80%9D%20in%20the%20Terminal%20menu%2C%20or%20clicking%20the%20%E2%80%98%2B%E2%80%9D%20in%20the%20terminal%20view.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-center%22%20image-alt%3D%22Picture10.png%22%20style%3D%22width%3A%20780px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F233351i157F2B9723FF6CD8%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Picture10.png%22%20alt%3D%22Picture10.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFrom%20there%20you%20are%20using%20the%20Cloud%20Shell%20Image%20and%20all%20the%20tools%20that%20are%20configured%20in%20it%2C%20it%E2%80%99s%20always%20up%20to%20date%20and%20you%20get%20access%20to%20the%20full%20power%20of%20VS%20Code%20instead%20of%20the%20Code%20%E2%80%9Clight%E2%80%9D%20editor%20available%20in%20the%20Online%20Azure%20Cloud%20Shell.%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ESo%2C%20to%20address%20the%20comment%2C%20%E2%80%9CYou%20forgot%20that%20online%20you%20can%20use%20code%20(Cloud%20Shell%20editor)%E2%80%9D.%20I%20say.%20You%E2%80%99re%20right%2C%20but%20I%20got%20something%20better!%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EI%20hope%20this%20helps!%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3ECheers!%3C%2FP%3E%0A%3CP%3E%3CBR%20%2F%3EPierre%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1883237%22%20slang%3D%22en-US%22%3E%3CP%3EThis%20follow%20up%20to%20my%20previous%20post%20on%20running%20a%20local%20copy%20of%20the%20Azure%20Cloud%20Shell%20addresses%20a%20comment%20someone%20sent%20me%20that%20I%20had%20forgotten%20that%20the%20Code%20editor%2C%20is%20not%20available%20in%20the%20open%20source%20image%20of%20the%20clod%20shell.%26nbsp%3B%20%26nbsp%3BThe%20comment%20was%20correct%2C%20but%20i%20have%20something%20better.%26nbsp%3B%20%26nbsp%3BRead%20on!%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1883237%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAzure%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EPowerShell%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3Eshell%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

Hello Folks,

 

In my last post I discussed how you can run the managed image that the Azure Cloud Shell is based on locally.  It allows you to leverage the Azure Shell managed environment without being subject to the limitations of the real Azure Cloud Shell.

 

Following that post, someone said to me, “You forgot that online you can use code (Cloud Shell editor)”.

 

Well.  Yes and no…

 

Let me elaborate… No, you cannot use the same Code version in the shell.

Picture1.png

 

However, there is a great way to use the container version WITH the full Visual Studio Code.   I must admit that I MUCH prefer it this way. Mostly because I can use all the extensions in VS Code that make my life easier.  Extensions like:

To name a few.

Here’s how I set that up, so I get the best of both worlds.  A managed Cloud Shell environment and a local powerful code editor.

 

Connecting to VS Code to the Running container

So,  we already covered how we setup and start the container in the last post. Now to connect VS Code to the container we need to get one more extension.  The Remote - Containers extension lets you use a Docker container as a full-featured environment.  To quickly swap between different, isolated development environments and safely make updates without worrying about impacting your local machine.

 

Picture2.png

 

Once it’s installed, I press F1 to bring up the Command Palette and type in Remote-Containers for a full list of commands.

 

Picture3.png

 

You can also click on the Remote "Quick Access" status bar item to get a list of the most common commands.

 

 

Picture4.png

 

From the Command Palette select “Remote-Containers: Attach to Running Container…”

 

 

 

Picture5.png

 

A list of running containers will be presented and I select the one that’s running my “Local Cloud Shell”.

 

Picture6.png

 

It will ten connect to the container environment.

 

Picture7.png

 

Connecting to the mapped folder inside the container

Connecting to the mapped folder is as easy as opening a folder and navigating to the folder in the container mapped to the local location.

 

vscode-folder.gif

 

The last piece of this puzzle is the terminal. Because I’m connected to the container, I have access to all the environments that are setup in there. By selecting ‘Terminal’ from the ‘view’ menu I can open the default environment which is a bash shell.


But I can easily open a PowerShell terminal by selecting “Select Default Shell” in the terminal shell selection drop down.

 

Picture8.png

 

And selecting the PowerShell Core environment setup in the image of the cloud shell.

 

Picture9.png

 

And finally, starting a new terminal either by selecting ‘New Terminal” in the Terminal menu, or clicking the ‘+” in the terminal view.

 

Picture10.png

 

From there you are using the Cloud Shell Image and all the tools that are configured in it, it’s always up to date and you get access to the full power of VS Code instead of the Code “light” editor available in the Online Azure Cloud Shell.


So, to address the comment, “You forgot that online you can use code (Cloud Shell editor)”. I say. You’re right, but I got something better!


I hope this helps!


Cheers!


Pierre