Product:
Mirantis Docker
https://docs.mirantis.com/mcr/25.0/single/
Issue:
Try to install Mirantis (docker) software on new Windows 2022 server. Get error like:
.\install.ps1 : File D:\temp\install.ps1 cannot be loaded. The contents of file
D:\temp\install.ps1 might have been changed by an unauthorized user or process, because the hash of
the file does not match the hash stored in the digital signature. The script cannot run on the specified system. For
more information, run Get-Help about_Signing..
At line:1 char:1
+ .\install.ps1 -Offline
+ ~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
Suggested Solution:
Check that you have the same local on new server as on old server with powershell command:
GET-WinSystemLocale LCID Name DisplayName ---- ---- ----------- 1033 en-US English (United States)
Change the security level with a powershell command:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
This will give this response text:
Execution Policy Change
The execution policy helps protect you from scripts that you do not trust. Changing the execution policy might expose
you to the security risks described in the about_Execution_Policies help topic at
https:/go.microsoft.com/fwlink/?LinkID=135170. Do you want to change the execution policy?
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is “N”): Y
Run then this command to install mirantis docker:
.\install.ps1 -Offline
Installing the containers feature. It is a prerequisite for containers on Windows and requires a reboot.
Using preloaded zip File D:\temp\Docker.zip for installing package Docker
Using preloaded zip File D:\temp\Containerd.zip for installing package Containerd
Installed Docker 25.0.7m3, build caad55120f4543209cf95baeb66ea33b675a771
Installed Containerd 1.6.36
Install/upgrade completed
WARNING: Your machine needs to be rebooted now. Installed packages will not work without reboot.
PS D:\temp>
More Information:
To get docker to create the container files on folder d:\docker, you need to create a text file in folder C:\ProgramData\docker\config, that looks like this;
