Skip to content

Instantly share code, notes, and snippets.

@peteristhegreat
Last active January 30, 2020 20:32
Show Gist options
  • Save peteristhegreat/fcba8541812baae30b391379a0f6e94e to your computer and use it in GitHub Desktop.
Save peteristhegreat/fcba8541812baae30b391379a0f6e94e to your computer and use it in GitHub Desktop.
Docker for Windows and Docker Desktop notes

Direct Link for Docker

https://download.docker.com/win/stable/Docker%20for%20Windows%20Installer.exe

Links and Articles

https://docs.microsoft.com/en-us/virtualization/windowscontainers/

https://hub.docker.com/_/microsoft-windows-servercore

https://github.com/MicrosoftDocs/Virtualization-Documentation

https://github.com/sixeyed/docker-on-windows

Mapping a Drive inside a Docker Container

https://blog.sixeyed.com/docker-volumes-on-windows-the-case-of-the-g-drive/

Map C:/data to the G:/ inside the docker container

FROM mcr.microsoft.com/windows/servercore:ltsc2019
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

VOLUME C:\data

RUN Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\DOS Devices' -Name 'G:' -Value "\??\C:\data" -Type String;  

Note, that putting VOLUME inside the Dockerfile instead of just in the docker run command makes more images everytime you run the image, so it might just be better to do the linkage outside.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment