Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobias Fredriksson committed Aug 15, 2019
2 parents c85e2bc + 3aee7bb commit 90276c5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions docker/dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM mcr.microsoft.com/powershell:latest
LABEL description="Based on the Microfot Ubuntu 18.04 for Linux PowerShell Dockerfile that will download and start Universal Dashboard Community on port 8080"

# FROM: https://hub.docker.com/_/microsoft-powershell
# Build: docker build . --tag=universaldashboarddemo
# Run: docker run -it -p 8080:8080 universaldashboarddemo:latest

EXPOSE 8080
COPY [ "./startdashboard.ps1", "/home/startdashboard.ps1" ]
ENTRYPOINT ["pwsh", "/home/startdashboard.ps1"]
14 changes: 14 additions & 0 deletions docker/startdashboard.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Write-Host "Installing Universal Dashboard Community Edition..."
Install-module UniversalDashboard.Community -AllowPrerelease -AcceptLicense -Force
Import-module UniversalDashboard.Community -Force

Write-Host "Starting Demo Dashboard..."

Try{
Get-UDDashboard | Stop-UDDashboard
Start-UDDashboard -Port 8080
Read-Host "Universal Dashboard Community Edition is now running!"
}
Catch{
Write-Host "UniversalDashboard failed to start!"
}

0 comments on commit 90276c5

Please sign in to comment.