Polaris icon indicating copy to clipboard operation
Polaris copied to clipboard

Add 'Polaris running in a container' examples

Open Stijnc opened this issue 6 years ago • 3 comments

@tylerl0706, as discussed on twitter, a placeholder issue to add the docker and kubernetes example I used to the polaris repo.

How would you like it to be structured? Do I create a subfolder 'container' under 'example'?

Stijnc avatar Oct 29 '18 07:10 Stijnc

Isn't is as easy as adding a Dockerfile example? Here's something I run in Google Cloud:

FROM microsoft/powershell

SHELL ["/opt/microsoft/powershell/6/pwsh", "-command"]
RUN Set-PSRepository -Name PSGallery -InstallationPolicy Trusted
RUN Install-Module jwt -SkipPublisherCheck
RUN Install-Module Polaris -SkipPublisherCheck

COPY Run.ps1 /Run.ps1

EXPOSE 8080

ENTRYPOINT ["pwsh", "/Run.ps1" ]

SP3269 avatar Nov 20 '19 05:11 SP3269

Yep that should be all there is to it!

btw, what version of PowerShell does that give you - I would think you'd want to do:

FROM mcr.microsoft.com/powershell

TylerLeonhardt avatar Nov 25 '19 06:11 TylerLeonhardt

docker pull microsoft/powershell pulls 6.2.4, which is the current RTM version today. Same image id as the one from mcr.microsoft.com/powershell, too. Not sure how the sync is set up though.

SP3269 avatar Feb 03 '20 01:02 SP3269