Created
July 25, 2018 17:41
-
-
Save glennswest/4bb29802fb4cb545370db85059e03bb7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$a = Test-Path "C:\k\docker_create.lock" | |
IF ($a -eq "True") {Write-Host "Docker Network Already Created";exit} | |
Write-Host "Creating Docker Network" | |
date > c:\k\docker_create.lock | |
$roughname = Get-NetAdapter | where adminstatus -eq "up" | Format-List -Property "Name" | Out | |
-String | |
$NetAdapterName = $roughname.Substring(11) | |
# multinode | |
#docker network create -d transparent --gateway 10.128.2.1 --subnet 10.128.2.0/24 -o com.docker.network.windowsshim.interface="Ethernet0" external | |
# Single node | |
docker network create -d transparent --gateway 10.128.1.1 --subnet 10.128.1.0/24 -o com.docker.network.windowsshim.interface=$NetAdapterName external | |
~ | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment