Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Open with Docker (Right-Click Context Menu)

Open with Docker

Allows you to open a host's directory within a mcr.microsoft.com/windows/servercore:ltsc2019 container mounted as C:\host. Quickly run scripts and other utilities against a virgin Windows Server Core image while still maintaining ability to edit files on the host.

Context Menu Docker Container

Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Docker]
@="Open with Docker"
"Icon"="C:\\Program Files\\Docker\\Docker\\resources\\ddvp.ico"
[HKEY_CURRENT_USER\Software\Classes\Directory\Background\shell\Docker\command]
@="cmd /c docker.exe run -it --rm --volume \"%V:C:\\host\" --workdir \"C:\\host\" --entrypoint \"powershell.exe\" \"mcr.microsoft.com/windows/servercore:ltsc2019\""
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\Docker]
@="Open with Docker"
"Icon"="C:\\Program Files\\Docker\\Docker\\resources\\ddvp.ico"
[HKEY_CURRENT_USER\Software\Classes\Directory\shell\Docker\command]
@="cmd /c docker.exe run -it --rm --volume \"%V:C:\\host\" --workdir \"C:\\host\" --entrypoint \"powershell.exe\" \"mcr.microsoft.com/windows/servercore:ltsc2019\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment