Skip to content

Instantly share code, notes, and snippets.

@sdaaish
Created November 5, 2019 16:27
Show Gist options
  • Save sdaaish/c455e0b41a89abe0344c50e246461c6f to your computer and use it in GitHub Desktop.
Save sdaaish/c455e0b41a89abe0344c50e246461c6f to your computer and use it in GitHub Desktop.
$text = @"
Print som text with updated information `n
$(Get-Date)`n
Some more text`n
"@
$html = ConvertTo-HTML -Body $text
"$html"
Set-Content -path index.html -value $html
"$text"
$a = Convert-Path .
$exe = "docker"
$params = "run", "--rm"
#$params += "-v", "${a}:/usr/share/nginx/html"
$params += "-v", "$(Convert-Path .):/usr/share/nginx/html"
$params += "-p", "8080:80", "nginx"
"$params"
& $exe @params
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment