- Open cmd with admin rights:
- Press Win+R
- Type "cmd" (without quotes)
- Press Ctrl+Shift+Enter
- Install chocolatey package manager (reference: https://docs.chocolatey.org/en-us/choco/setup#install-with-cmd.exe):
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "[System.Net.ServicePointManager]::SecurityProtocol = 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" - Enable Hyper-V Containers:
choco install Containers Microsoft-Hyper-V --source windowsfeatures -y - Install docker and dockerd(reference: https://community.chocolatey.org/packages/docker-engine):
choco install docker-engine -y - Unregister default dockerd service and register with custom size(default is 20G which is not enough for windows containers):
cd "C:\Program Files\docker" dockerd --unregister-service dockerd --register-service --storage-opt size=YOUR_CONTAINER_SIZE
- Start docker service before using docker:
net start docker - Done! You are ready to build/run your windows containers.
Created
June 13, 2024 08:21
-
-
Save SanyaNya/0b107cfccb8311a68436eeab10a1ba28 to your computer and use it in GitHub Desktop.
Windows containers guide with cmd
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment