I am trying to install the Docker enterprise edition on CIS AMI of windows 2016 server using ansible. I am using PowerShell module for this installation. The code is as below for the docker installation task.
- name: Install Docker for windows. win_shell: > [Net.ServicePointManager]::SecurityProtocol = "tls12"; Install-Module -Name DockerMsftProvider -confirm:$false -Force; Install-Package Docker -ProviderName DockerMsftProvider -confirm:$false –Force when: ecs_docker == True
This is inside CI-CD and code get executed on circleci docker image. Above task fails giving below message.
Install-Module : NuGet provider is required to interact with NuGet-based repositories.
To install Nuget package manager, I have included below task.
- name: Install Nuget repository. win_chocolatey: name: nugetpackagemanager state: present
Still message is same. Above task completes installation of Nuget package manager. There is another message which is as below.
Windows PowerShell is in NonInteractive mode. Read and \r\nPrompt functionality is not available
-force parameter as well for forceful installation of docker however it fails the build. I am building windows based docker images which I am going to host on this 2016 server.