Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add walkthrough for running PSRule within a Docker container #50

Closed
BernieWhite opened this issue Dec 31, 2018 · 3 comments
Closed

Add walkthrough for running PSRule within a Docker container #50

BernieWhite opened this issue Dec 31, 2018 · 3 comments
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed

Comments

@BernieWhite
Copy link
Member

BernieWhite commented Dec 31, 2018

Currently PSRule supports Windows using PowerShell 5.1 and above.

This is great for Windows administrators however not great for everyone else. When enabling validation within a CI/CD pipeline, the agent platform might not be Windows.

Containers provide portability and consistency which is very applicable for PSRule.

PowerShell is already available in a published Docker container.

docker pull mcr.microsoft.com/powershell

i.e.

docker run -it --rm mcr.microsoft.com/powershell
@BernieWhite BernieWhite added the enhancement New feature or request label Dec 31, 2018
@BernieWhite
Copy link
Member Author

BernieWhite commented Jan 3, 2019

Requires #49

@BernieWhite
Copy link
Member Author

An example Dockerfile.

FROM mcr.microsoft.com/powershell:ubuntu-16.04
SHELL ["pwsh", "-command"]
RUN Install-Module -Name PSRule -AllowPrerelease -Force;
RUN Import-Module -Name PSRule;

ARG IMAGE_NAME=PSRule:0.2.0-ubuntu-16.04

LABEL maintainer="Bernie White" \
      readme.md="https://github.com/BernieWhite/PSRule/blob/master/README.md" \
      description="This Dockerfile will install the PSRule PowerShell module."

CMD [ "pwsh" ]

@BernieWhite
Copy link
Member Author

At this stage providing tooling is not required. This issue should focus on documention.

@BernieWhite BernieWhite added documentation Improvements or additions to documentation and removed enhancement New feature or request labels Jan 10, 2019
@BernieWhite BernieWhite changed the title Add support for running within a Docker container Add walkthrough for running PSRule within a Docker container Jan 11, 2019
@BernieWhite BernieWhite added good first issue Good for newcomers help wanted Extra attention is needed labels Sep 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants