Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Configuration DockerSwarm
{
param
(
[Parameter()]
[System.String[]]
$NodeName = 'localhost'
)
Import-DscResource -ModuleName xNetworking
Node $NodeName
{
xFirewall DockerSwarmTCP
{
Name = 'DockerSwarmTCP'
DisplayName = 'Docker Swarm (TCP-in)'
Action = 'Allow'
Direction = 'Inbound'
LocalPort = ('2377', '7946')
Protocol = 'TCP'
Profile = 'Any'
Enabled = 'True'
}
xFirewall DockerSwarmUDP
{
Name = 'DockerSwarmUDP'
DisplayName = 'Docker Swarm (UDP-in)'
Action = 'Allow'
Direction = 'Inbound'
LocalPort = ('7946', '4789')
Protocol = 'UDP'
Profile = 'Any'
Enabled = 'True'
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.