Running Install-Package docker -Update clears down the existing contents of C:\Program Files\docker before installing the update. Two problems with this:
if the install fails, the old version has already been deleted, so you lose Docker
if you had other files in C:\Program Files\docker you lose them after the upgrade.
I've seen the first problem happen with a poor Internet connection.
The second problem means you lose Docker Compose if you had downloaded docker-compose.exe to the Docker directory.
Example - upgrading from 1.13 to 17.03:
PS C:\Program Files\Docker> ls
Directory: C:\Program Files\Docker
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 08/02/2017 23:10 1.12
d----- 08/02/2017 23:11 completion
-a---- 23/02/2017 01:08 6362399 docker-compose.exe
-a---- 08/02/2017 16:51 13563392 docker.exe
-a---- 08/02/2017 16:51 32641790 dockerd.exe
-a---- 06/01/2017 08:14 164 metadata.json
PS C:\Program Files\Docker> install-package docker -update
The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'DockerDefault'?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "N"): a
Name Version Source Summary
---- ------- ------ -------
Docker 17.03.0-ee DockerDefault Contains Docker EE for use with Windows Server 2016 and Nano Server.
PS C:\Program Files\Docker> ls
Directory: C:\Program Files\Docker
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a---- 01/03/2017 01:02 13568264 docker.exe
-a---- 01/03/2017 01:02 32660368 dockerd.exe
-a---- 13/03/2017 17:41 152 metadata.json
Running
Install-Package docker -Update
clears down the existing contents ofC:\Program Files\docker
before installing the update. Two problems with this:C:\Program Files\docker
you lose them after the upgrade.I've seen the first problem happen with a poor Internet connection.
The second problem means you lose Docker Compose if you had downloaded
docker-compose.exe
to the Docker directory.Example - upgrading from 1.13 to 17.03: