Installing docker on NANO server

Installing Docker on Nano Server in windows 2016

In this blog, we will show you installing docker on nano server.

REQUIREMENTS
  • A Nano server with static (or) dynamic IP.

NANO SERVER OVERVIEW

  • We have already installed a nano server VM for this demonstration. We also set an IP as 192.168.232.81 and it’s in WORKGROUP.
installing docker on nano server

ACCESSING NANO SERVER REMOTE SERVER

  • As this nano server is not in a domain, we need to add the nano server IP in the trusted host on the remote server. To add the trusted hosts execute the below command.

Set-Item WSMan:\localhost\Client\TrustedHosts 192.168.232.81 -Force

installing docker on nano server
  • To access the nano server remotely, execute the below command.

Enter-PSSession -ComputerName 192.168.232.81 -Credential (get-credential)

installing docker on nano server

Provide the login credentials and click OK.

  • After successful login, the PowerShell prompt will look like below.
installing docker on nano server

You can see the Nano server IP on left side of command prompt.

INSTALLING WINDOWS UPDATES ON NANO SERVER

POWERSHELL COMMANDS:
  • To install the windows updates, execute the below commands.

$sess = New-CimInstance -Namespace root/Microsoft/Windows/WindowsUpdate -ClassName MSFT_WUOperationsSession

Invoke-CimMethod -InputObject $sess -MethodName ApplyApplicableUpdates

The first command will create a session using New-Ciminstance cmdlet for MSFT_WUOperationsSession class. Then we are invoking a CIM method for MSFT_WUOperationsSession class for the method ApplyApplicableUpdates.

installing docker on nano server
  • Once the installation completes, it shows the return value as 0. It means, all the updates has been installed successfully.
installing docker on nano server
  • Restart the nano server to apply the changes using below command.
Restart-Computer
installing docker on nano server

Then exit the session using exit command and re-connect the server using PSSession command.

INSTALLING NuGet PROVIDER

  • Once you reconnect to the nano server, execute the below command to install NuGet provider for docker.

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force

installing docker on nano server
  • Type Y and press enter to import the NuGet provider.
installing docker on nano server
  • It shows the PowerShell command prompt once the installation is complete.
installing docker on nano server

INSTALLING DOCKER SERVICE

  • From the PowerShell command prompt, execute the below command to install docker package.

Install-Package -Name docker -ProviderName DockerMsftProvider –verbose

installing docker on nano server
  • Type A and press enter to accept the non-trusted docker package.
installing docker on nano server
  • Installation is completed and we need to restart the nano server to apply the changes.
installing docker on nano server
  • Restart the nano server using the below command.

Restart-Computer

installing docker on nano server

VERIFYING DOCKER SERVICE

  • Reconnect the nano server and check the status of the docker service using below command.

Get-Service docker

Installing Docker on Nano Server
  • If service is in stopped state, use start-service docker to start the docker service.
  • To check the docker version, execute the below command.

docker version

Installing Docker on Nano Server
Video

Thanks for reading this blog. We hope this was useful for you to install docker in nano server.

Loges