OneGet / MicrosoftDockerProvider

Provider to search, save and install Docker
Other
135 stars 56 forks source link

Install Docker EE on Windows Server 2016 fails using elevated PowerShell #56

Open SpartaSixZero opened 5 years ago

SpartaSixZero commented 5 years ago

I'm following the instructions here to install Docker EE on a Windows Server 2016 machine.

docker-ee-documentation

It fails at this step:

Install-Package Docker -ProviderName DockerMsftProvider -Force

Below is the error message:

VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
VERBOSE: Download size: 0.01MB
VERBOSE: Free space on the drive: 115823.64MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 0 seconds.
VERBOSE: Performing the operation "Install Package" on target "Package 'Docker' version '18.09.3' from
'DockerDefault'.".
VERBOSE: Unregistering the docker service
VERBOSE: Removing the docker files
VERBOSE: Removing the path variable
VERBOSE: Download size: 34MB
VERBOSE: Free space on the drive: 115955.6MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/docker-18-09-3.zip to
C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 12 seconds.
VERBOSE: Verifying Hash of the downloaded file.
VERBOSE: Hash verified!
VERBOSE: Found C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip to install.
VERBOSE: Trying to unzip : C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
VERBOSE: Preparing to expand...
VERBOSE: Created 'C:\Program Files\docker\docker.exe'.
VERBOSE: Created 'C:\Program Files\docker\vcruntime140.dll'.
VERBOSE: Created 'C:\Program Files\docker\licenses.txt'.
VERBOSE: Created 'C:\Program Files\docker\libeay32.dll'.
VERBOSE: Created 'C:\Program Files\docker\dockerd.exe'.
VERBOSE: Created 'C:\Program Files\docker\ssleay32.dll'.
VERBOSE: Created 'C:\Program Files\docker\libwinpthread-1.dll'.
VERBOSE: Trying to enable the docker service...
VERBOSE: Removing the archive: C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
Install-Package : Cannot rename because item at 'C:\Program Files\dummyName' does not exist.
At line:1 char:1
+ Install-Package Docker -ProviderName DockerMsftProvider -Force -Verbo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package],
   Exception
    + FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RenameItemCommand,Microsoft.PowerShell.P
   ckageManagement.Cmdlets.InstallPackage

I have seen this similar post: error installing docker via powershell

However, on our Windows Server machine, we don't have Symantec Antivirus installed so I'm ruling that one out.

Just for fun, I created the directory C:/Program Files/dummyName and this is what I got when I tried running the same command:

VERBOSE: Using the provider 'DockerMsftProvider' for searching packages.
VERBOSE: Download size: 0.01MB
VERBOSE: Free space on the drive: 115753.9MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/DockerMsftIndex.json to
C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 0 seconds.
VERBOSE: Performing the operation "Install Package" on target "Package 'Docker' version '18.09.3' from
'DockerDefault'.".
VERBOSE: Unregistering the docker service
VERBOSE: Removing the docker files
VERBOSE: Removing the path variable
VERBOSE: Download size: 34MB
VERBOSE: Free space on the drive: 115885.86MB
VERBOSE: Downloading https://dockermsft.blob.core.windows.net/dockercontainer/docker-18-09-3.zip to
C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
VERBOSE: About to download
VERBOSE: Finished downloading
VERBOSE: Downloaded in 0 hours, 0 minutes, 6 seconds.
VERBOSE: Verifying Hash of the downloaded file.
VERBOSE: Hash verified!
VERBOSE: Found C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip to install.
VERBOSE: Trying to unzip : C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
VERBOSE: Preparing to expand...
VERBOSE: Created 'C:\Program Files\docker\docker.exe'.
VERBOSE: Created 'C:\Program Files\docker\vcruntime140.dll'.
VERBOSE: Created 'C:\Program Files\docker\licenses.txt'.
VERBOSE: Created 'C:\Program Files\docker\libeay32.dll'.
VERBOSE: Created 'C:\Program Files\docker\dockerd.exe'.
VERBOSE: Created 'C:\Program Files\docker\ssleay32.dll'.
VERBOSE: Created 'C:\Program Files\docker\libwinpthread-1.dll'.
VERBOSE: Trying to enable the docker service...
VERBOSE: Removing the archive: C:\Users\ms030441\AppData\Local\Temp\DockerMsftProvider\Docker-18-09-3.zip
Install-Package : Cannot create a file when that file already exists.
At line:1 char:1
+ Install-Package Docker -ProviderName DockerMsftProvider -Force -Verbo ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Program Files\dummyName:String) [Install-Package], Exception
    + FullyQualifiedErrorId : RenameItemIOError,Microsoft.PowerShell.Commands.RenameItemCommand,Microsoft.PowerShell.P
   ackageManagement.Cmdlets.InstallPackage
slonopotamus commented 2 years ago

You might want to take a look at Stevedore project as a way to install modern Docker for Windows containers on both Windows Server/Client.