-
Notifications
You must be signed in to change notification settings - Fork 336
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
Distributing the Module as a Docker Image #1580
Comments
@shurick81 I have no such experience myself to be able to set this up. Would you be able to do this? |
@KoenZomers yes, I would love to do it. First of all we could discuss some more specific use cases here in this thread and then I could come up with a PR. |
Nice. I think you mention one yourself already in your start post. I could envision having a docker image per version perhaps to test things in a specific version? Not a docker guy here so not sure if that makes sense. |
I suggest that if we go with docker image, we need to extend the use cases.
What do you think? |
Here's a preliminary result:
|
The easiest way to try it out if you have Docker installed:
|
I can see that in the m365pnp organization in Docker Hub, there are already a few images:
Do you think it is fine if we name the image m365pnp/powershell? |
Do we need this container runnable on ARM platform? |
Here's how you could currently try it out:
Also tested (in Linux at least) that it is possible to manipulate with files on the host using commands in a container:
|
Here's the commit so far: dev...alexsapozhkov:dev |
PR: #1794 |
* building docker image in workflows * ls * cd dev * checkout * removing debug output * nightly version * docker login * docker secret * pushing to docker hub * docker readme * using DOCKER_USERNAME and DOCKER_PASSWORD * using DOCKER_USERNAME and DOCKER_PASSWORD * adding nightly tag * verified adding nightly tag * corrected user name ref * run via schedule again * more specific job name * divided job into simpler steps * testing pipeline for publishing * preparing for linux containers * triggering on yaml change * password in quoutes * testing publishing script with parameters * no ` needed for pwsh jobs * Getting docker tags via Invoke-RestMethod * show every unpublished image * fixed version comparisons * publishin all not prereleases * safer manipulating with : * replacing quotes * universal docker file * using universal dockerfile instead of special * listing published images with 10k limit * release only running via schedule * updated base image version * cleaning nightly release before merging to origin * typo in yaml cleaning * removing unused file * removing unused file * removing old files * new line at end of file * more documentation for manual publishing * removing unneccessary (so far) documentation * publishing image for 5 platform * fixing parameters in github actions * typo in space * sticking to 1 dockerfile * altering installation user * 3 platforms for Windows is default * fixed string comparison * removing unnecessary quotes * fixed logical comparison * specifying platform for building * using buildx for arm32v7-ubuntu-bionic * buildx debug output * buildx build --load * removing arm image * keeping 3 platforms * publishing latest for only linux * nightly release for 3 platforms * replacing with a fake job * using PS syntax for Windows builder * fixing more PS syntax in pipeline * returning back the module publishing steps * installing module for all the users * outputting module list after installing * installing module for all the users * installing for all users in Linux * removing arm image from docu * more user documentation * removed unused space in the dockerfile * reference to the PS gallery for versions * correcting the pnp organization name in Docker
I guess we are done here? |
Yep seems like it :) Thanks for your efforts! |
Is your feature request related to a problem? Please describe.
As a developer working with a multitude of projects where PnP.Powershell is used, I would like to be able to quickly run the module without the need of actually installing the module in the host environment so that I have isolated and repeatable experience of using the module for multiple different project.
Describe the solution you'd like
Every time when a new version of the PnP.PowerShell module is released, we could
I tried the following Dockerfile locally and it works quite fine for me so far:
Describe alternatives you've considered
Alternatively we could just come up with a small guide/demo/webinar that shows how to build and use a local image, since there is no published one.
Additional context
We wanted to consider this improvement when the module GA is close enough, but then this issue was forgotten I believe:
#11
The text was updated successfully, but these errors were encountered: