From a7d5bc4d42dfa920e15de4be3a67b9ef3a82b130 Mon Sep 17 00:00:00 2001 From: Lee Berg Date: Thu, 15 Aug 2019 00:30:00 -0500 Subject: [PATCH] Adding Dockerfile for UD Community Demo --- docker/dockerfile | 10 ++++++++++ docker/startdashboard.ps1 | 14 ++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 docker/dockerfile create mode 100644 docker/startdashboard.ps1 diff --git a/docker/dockerfile b/docker/dockerfile new file mode 100644 index 00000000..b36abefb --- /dev/null +++ b/docker/dockerfile @@ -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"] \ No newline at end of file diff --git a/docker/startdashboard.ps1 b/docker/startdashboard.ps1 new file mode 100644 index 00000000..96b8f17d --- /dev/null +++ b/docker/startdashboard.ps1 @@ -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!" +}