W jaki sposób mogę zainstalować Dockera na Windows Server 2016?

0

Dzień dobry,
pytanie jak w temacie :)
Dodam że próbowałem skorzystać z tego polecenia: Install-Package -Name docker -ProviderName DockerMsftProvider -Verbose, ale niestety wyświetlił mi takie błędy:

VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
WARNING: Cannot find path 'C:\Users\ADMINI~1\AppData\Local\Temp\2\DockerMsftProvider\DockerDefault_DockerSearchIndex.json' because it does not exist.
WARNING: Cannot bind argument to parameter 'downloadURL' because it is an empty string.
WARNING: The property 'AbsoluteUri' cannot be found on this object. Verify that the property exists.
WARNING: The property 'RequestMessage' cannot be found on this object. Verify that the property exists.
Install-Package : No match was found for the specified search criteria and package name 'docker'. Try Get-PackageSource to see all available registered package sources.
At line:1 char:1

  • Install-Package -Name docker -ProviderName DockerMsftProvider -Verbos ...
  •  + CategoryInfo          : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
     + FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
    

Aktualizacja:
Wykonałem teraz poniższe polecenie:
Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/Windows-Containers/Main/helpful_tools/Install-DockerCE/install-docker-ce.ps1" -o install-docker-ce.ps1
.\install-docker-ce.ps1

I otrzymałem takie komunikaty:

Querying status of Windows feature: Containers...
Feature Containers is already enabled.
DOCKER default
Checking Docker versions
Downloading https://download.docker.com/win/static/stable/x86_64/docker-24.0.5.zip to C:\Users\Administrator\DockerDownloads\docker-24.0.5.zip
Installing Docker... C:\Users\Administrator\DockerDownloads\docker-24.0.5\docker\docker.exe
Installing Docker daemon... C:\Users\Administrator\DockerDownloads\docker-24.0.5\docker\dockerd.exe
Configuring the docker service...
Start-Service : Failed to start service 'Docker Engine (docker)'.
At C:\Users\Administrator\install-docker-ce.ps1:689 char:5

  • Start-Service -Name $global:DockerServiceName
    
  • ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : OpenError: (System.ServiceProcess.ServiceController:ServiceController) [Start-Service], ServiceCommandException
    • FullyQualifiedErrorId : StartServiceFailed,Microsoft.PowerShell.Commands.StartServiceCommand

Waiting for Docker daemon...
docker : error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
At C:\Users\Administrator\install-docker-ce.ps1:720 char:13

  •         docker version | Out-Null
    
  •         ~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (error during co...file specified.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

docker : error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
At C:\Users\Administrator\install-docker-ce.ps1:720 char:13

  •         docker version | Out-Null
    
  •         ~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (error during co...file specified.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

docker : error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
At C:\Users\Administrator\install-docker-ce.ps1:720 char:13

  •         docker version | Out-Null
    
  •         ~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (error during co...file specified.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

docker : error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
At C:\Users\Administrator\install-docker-ce.ps1:720 char:13

  •         docker version | Out-Null
    
  •         ~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (error during co...file specified.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

docker : error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "
http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/version": open //./pipe/docker_engine: The system cannot find the file specified.
At C:\Users\Administrator\install-docker-ce.ps1:720 char:13

  •         docker version | Out-Null
    
  •         ~~~~~~~~~~~~~~
    
    • CategoryInfo : NotSpecified: (error during co...file specified.:String) [], RemoteException
    • FullyQualifiedErrorId : NativeCommandError

Aktualizacja 2:
Chyba problemem jest to że dla Windows Server dostępna jest płatna wersja o nazwie Docker Enterprise Edition

Aktualizacja 3

Udało mi się uruchomić dockera z wiersza poleceń na Windows Server 2019, ale za pomocą poniższego artykułu:
https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=dockerce

Jutro spróbuje powalczyć jeszcze na Windows Server 2016 :)

0

strzelam w ciemno "the docker client must be run with elevated privileges to connect" ?
A nie myślałeś o WSL ?

1

WSL na Windows Serwer to słaby i nie zalecany pomysł.
Windows Server ma obsługę kontenerów Windows i odklikuje się to w Programs and Features - tam gdzie np
włączasz IISa.
To polecenie jakie wkleiłeś działa dla kontenerów Windows i dopiero po odkliknieciu wspomnianej opcji. Polecenia PS na to nie pamiętam.
Chcesz mieć tego dokera dla konterów opartych o Windows czy o Linux?

EDIT
Zresztą masz tutorial dla obu typów:
https://www.google.com/amp/s/computingforgeeks.com/how-to-run-docker-containers-on-windows-server-2019/%3famp

0
jurek1980 napisał(a):

WSL na Windows Serwer to słaby i nie zalecany pomysł.
Windows Server ma obsługę kontenerów Windows i odklikuje się to w Programs and Features - tam gdzie np
włączasz IISa.
To polecenie jakie wkleiłeś działa dla kontenerów Windows i dopiero po odkliknieciu wspomnianej opcji. Polecenia PS na to nie pamiętam.
Chcesz mieć tego dokera dla konterów opartych o Windows czy o Linux?

EDIT
Zresztą masz tutorial dla obu typów:
https://www.google.com/amp/s/computingforgeeks.com/how-to-run-docker-containers-on-windows-server-2019/%3famp

Niestety to też mi nie działa już na pierwszym poleceniu wysypuje się:
Windows PowerShell
Copyright (C) 2016 Microsoft Corporation. All rights reserved.

PS C:\Users\Administrator> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable. Please try again l
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:1711 char:9

  •     Get-PSGalleryApiAvailability -Repository $Repository
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Get-PSGalleryApiAvailability], InvalidOper
    • FullyQualifiedErrorId : PowerShellGalleryUnavailable,Get-PSGalleryApiAvailability

Get-PSGalleryApiAvailability : PowerShell Gallery is currently unavailable. Please try again l
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:4437 char:9

  •     Get-PSGalleryApiAvailability -Repository $Name
    
  •     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    • CategoryInfo : InvalidOperation: (:) [Get-PSGalleryApiAvailability], InvalidOper
    • FullyQualifiedErrorId : PowerShellGalleryUnavailable,Get-PSGalleryApiAvailability
      +

Opcje kontenerów również mam włączoną:
screenshot-20230803201939.png

1 użytkowników online, w tym zalogowanych: 0, gości: 1