Open andrew-sumner opened 5 years ago
Just encountered this. It's real and if this PR fixes it it should be merged.
Addendum: could have left this alone and called it bitrot on a repo that hasn't had much activity in awhile. The world is full of problems like this though so since I encountered it, I'll be the squeaky wheel.
@cwilhit -- you're the most recent commit on this repo. Should this be merged / is this repo deprecated and there's a better way to install the docker engine for windows via powershell? Thanks :)
I've have the same problem in a windows server VM:
`PS C:\Program Files> Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force -Verbose AUSFÜHRLICH: Der Anbieter "DockerMsftProvider" wird für die Paketsuche verwendet. AUSFÜHRLICH: Download size: 0.03MB AUSFÜHRLICH: Free space on the drive: 6279.79MB AUSFÜHRLICH: Downloading https://dockermsft.azureedge.net/dockercontainer/DockerMsftIndex.json to C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\DockerDefault_DockerSearchIndex.json AUSFÜHRLICH: About to download AUSFÜHRLICH: Finished downloading AUSFÜHRLICH: Downloaded in 0 hours, 0 minutes, 0 seconds. AUSFÜHRLICH: Ausführen des Vorgangs "Paket installieren" für das Ziel "Paket "Docker", Version "20.10.0", von "DockerDefault".". AUSFÜHRLICH: Updating the docker installation. AUSFÜHRLICH: Unregistering the docker service AUSFÜHRLICH: Removing the docker files AUSFÜHRLICH: Removing the path variable AUSFÜHRLICH: Download size: 88.4MB AUSFÜHRLICH: Free space on the drive: 6522.21MB AUSFÜHRLICH: Downloading https://dockermsft.azureedge.net/dockercontainer/docker-20-10-0.zip to C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\Docker-20-10-0.zip AUSFÜHRLICH: About to download AUSFÜHRLICH: Finished downloading AUSFÜHRLICH: Downloaded in 0 hours, 0 minutes, 2 seconds. AUSFÜHRLICH: Verifying Hash of the downloaded file. AUSFÜHRLICH: Hash verified! AUSFÜHRLICH: Found C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\Docker-20-10-0.zip to install. AUSFÜHRLICH: Trying to unzip : C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\Docker-20-10-0.zip AUSFÜHRLICH: Erweitern wird vorbereitet... AUSFÜHRLICH: 'C:\Program Files\docker\docker.exe' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\vcruntime140.dll' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\licenses.txt' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\libeay32.dll' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\dockerd.exe' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\ssleay32.dll' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\libwinpthread-1.dll' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\cli-plugins\' wird hinzugefügt. AUSFÜHRLICH: 'C:\Program Files\docker\cli-plugins\docker-registry.exe' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\cli-plugins\docker-app.exe' wurde erstellt. AUSFÜHRLICH: 'C:\Program Files\docker\cli-plugins\docker-cluster.exe' wurde erstellt. AUSFÜHRLICH: Trying to enable the docker service... AUSFÜHRLICH: Removing the archive: C:\Users\ADMINI~1\AppData\Local\Temp\DockerMsftProvider\Docker-20-10-0.zip Install-Package : Das Umbenennen ist nicht möglich, da das Element unter "C:\Program Files\dummyName" nicht vorhanden ist. In Zeile:1 Zeichen:1
+ CategoryInfo : InvalidOperation: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Exception
+ FullyQualifiedErrorId : InvalidOperation,Microsoft.PowerShell.Commands.RenameItemCommand,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage`
I just encountered this error on windows server 2019. Seeing that it was a race condition prompted me to try running the same command again; it worked. Until this is merged, anybody googling the error and arriving here could try this workaround: just retry.
There is a timing issue between unzip and rename of docker folder to dummyName where it appears the Expand-Archive command hasn't fully released all locks even though the command has completed.
This fix retries until rename is successful. Alternatively, the rename step could probably be removed completely.