Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

3 Commits

Repository files navigation

DockerInstallDsc

Powershell DSC Resource to install Docker for Windows on Windows Server

DSC Resources

DockerInstall

Parameters

ParameterAttributeDataTypeDescriptionAllowed Values
DockerVersionKeyStringVersion of Docker to Install ('18.03' e. g.)
InstallStateNotConfigurableStringCurrent State of DockerAbsent,Present
EnsureWriteStringSupposed State of DockerAbsent,Present
DockerNameNotConfigurableStringName of currently installed Docker Runtime

Description

The DockerInstall Class DSC Resource allows to install, uninstall or update Docker on Windows Server.

Examples

configuration example_docker_install {
param (
# Node Name
[Parameter(Mandatory=$false)]
[string]
$NodeName = 'localhost'
)
Import-DscResource -ModuleName PSDscResources
Import-DscResource -ModuleName PackageManagement
Import-DscResource -ModuleName DockerInstall
node $NodeName
{
#region WindowsFeatures
WindowsFeature Containers
{
Ensure = 'Present'
Name = 'Containers'
}
#endregion
#region Package Management
PackageManagement 'DockerMsftProvider'
{
Ensure = 'Present'
Name = 'DockerMsftProvider'
Source = 'PSGallery'
RequiredVersion = '1.0.0.8'
}
#endregion
#region Install Docker
DockerInstall Docker-EE {
Ensure = 'Present'
DockerVersion = '19.03'
DependsOn = '[PackageManagement]DockerMsftProvider'
}
Service Docker-srv {
Name = 'docker'
State = 'Running'
DependsOn = '[DockerInstall]Docker-EE'
}
#endregion
}
}

About

Powershell DSC Resource to install Docker for Windows on Windows Server

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages