$ip=(Get-NetIPAddress -AddressFamily IPv4 `
   | Where-Object -FilterScript { $_.InterfaceAlias -Eq "vEthernet (HNS Internal NIC)" } `
   ).IPAddress

docker kill portainer
docker rm -vf portainer

if (!(Test-Path C:\portainerdata)) {
  mkdir C:\portainerdata
}

if (Test-Path $env:USERPROFILE\.docker\ca.pem) {
  docker run -d -p 8000:9000 `
    -v $env:USERPROFILE\.docker:C:\ProgramData\portainer\certs `
    -v C:\portainerdata:C:\data `
    --name portainer portainer/portainer `
    -H tcp://$($ip):2376 --tlsverify
} else {
  docker run -d -p 8000:9000 `
  -v C:\portainerdata:C:\data `
  --name portainer portainer/portainer -H tcp://$($ip):2375
}

$ip=(Get-NetIPAddress -AddressFamily IPv4 `
   | Where-Object -FilterScript { $_.InterfaceAlias -Eq "vEthernet (HNS Internal NIC)" } `
   ).IPAddress

docker kill portainer
docker rm -vf portainer

if (!(Test-Path C:\portainerdata)) {
  mkdir C:\portainerdata
}

if (Test-Path $env:USERPROFILE\.docker\ca.pem) {
  docker run -d -p 8000:9000 `
    -v C:\portainerdata:C:\data `
    -v $env:USERPROFILE\.docker:C:\certs `
    --name portainer portainer/portainer:1.11.3 `
    -H tcp://$($ip):2376 --tlsverify
} else {
  docker run -d -p 8000:9000 `
    -v C:\portainerdata:C:\data `
    --name portainer portainer/portainer:1.11.3 -H tcp://$($ip):2375
}

Update Portainer 1.11.3 to fix certs path
Update Portainer 1.11.3 to fix certs path

Signed-off-by: Stefan Scherer <2fe843265e65a9540d5df64f4bed2ee6b7ca283e@icloud.com>
