Windows Server Notes
1. Extend Trial Period
-
To extend the trial period by an additional 180 days, do the following:
-
Launch an elevated command prompt.
-
Run
slmgr -rearm
-
2. Docker on Windows Server 2022
2.2. Docker Install
-
Original doc.
-
Install
Hyper-Vand select theContainersfeature. -
Install Docker
-
Launch an elevated
PowerShellwindow -
Execute:
Install-Module -Name DockerMsftProvider -Repository PSGallery -ForceInstall-Package -Name docker -ProviderName DockerMsftProvider
-
-
Now reboot
Restart-Computer -
Test a Docker image.
-
Launch an elevated CMD window and run the following:
docker run -d -p 9001:9001 --name The-Portainer-Agent --restart=always -v C:\:C:\host -v C:\ProgramData\docker\volumes:C:\ProgramData\docker\volumes -v \\.\pipe\docker_engine:\\.\pipe\docker_engine portainer/agent:latest -
Confirm
docker psExampleC:\Windows\system32>docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 94f3cc30eec4 portainer/agent:latest "C:/app/agent.exe" 2 minutes ago Up 2 minutes 0.0.0.0:9001->9001/tcp The-Portainer-Agent
-
-
2.3. Install Portainer Container Manager UI
-
What is
Portainer:Portainer hides the complexity of managing containers behind an easy-to-use UI. By removing the need to use the CLI, write YAML or understand manifests, Portainer makes deploying apps and troubleshooting problems so easy that anyone can do it.
— Portainer
| Requires docker container support |
2.3.1. Portainer Installation
-
Original install doc can be found here.
-
Launch an elevated PowerShell window and run the following commands:
-
Create a volume for the Portainer Server’s DB
docker volume create portainer_data -
Start the container:
docker run -d -p 8000:8000 -p 9443:9443 --name PortainerCE --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v portainer_data:C:\data portainer/portainer-ce
-
-
Open FireWall port
netsh advfirewall firewall add rule name="portainer" dir=in action=allow protocol=TCP localport=9443
-
Log in locally:
https://localhost:9443 -
Log in remotely:
https://v-serv2022-docker:9443/
-
3. WSL
-
Follow this doc.