If you’ve worked with Windows Containers, you’ll probably know this, but I have to admit that I didn’t and it really helps to work conveniently with Windows Containers, especially reading and editing files: You can access a Container with Enter-PSSession.
It works like this and I learned it from artisticcheese’s GitHub repo: First, install the necessary PowerShell modules by doing
1 2 | Register-PSRepository -Name DockerPS-Dev -SourceLocation https: //ci .appveyor.com /nuget/docker-powershell-dev Install-Module Docker -Repository DockerPS-Dev |
After that you can easily access your Container through Enter-PSSession like this
1 | Enter-PSSession -ContainerId (Get-Container navsqlcompose_nav_1).ID -RunAsAdministrator |
This is a big deal – at least to me – because I can now very conveniently edit files through PSEdit. E.g. if I want to change the config for Microsoft.Dynamics.Nav.Server.exe.config it is as simple as this inside PowerShell ISE:
1 2 | Enter-PSSession -ContainerId (Get-Container navsqlcompose_nav_1).ID -RunAsAdministrator PSEdit 'C:\Program Files\Microsoft Dynamics NAV\100\Service\Microsoft.Dynamics.Nav.Server.exe.config' |
You are currently viewing a placeholder content from Facebook. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Instagram. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from X. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information