powershell
powershell copied to clipboard
Documentation: Using pnp/powershell Docker Image
Is your feature request related to a problem? Please describe. Starting using pnp/powershell Docker Image might be tricky for beginners
Describe the solution you'd like An article, similar to https://pnp.github.io/powershell/articles/azurecloudshell.html, that presents different options and different examples of using the module in Docker.
Describe alternatives you've considered Alternative could be experimenting and learning individually
Additional context
Would you mind creating such an article yourself in a PR @shurick81? I think it would be very valuable.
I have prepared some draft here: https://github.com/shurick81/pnp.powershell/blob/feature/docker-docu/pages/articles/docker.md
Could someone look into instructions for Mac OS and test them? I don't have access to any MacBook at the moment.
@veronicageek Can you assist here?
Yep, will have a look as soon as I can.
@veronicageek - any update on this ? Would be great to have this in our docs 😊
@gautamdsheth - Nope, too busy with work and on annual leave for 3 weeks at the end of next week.
Could someone send me a spare Mac maybe? :)
@shurick81 - I'll go thru your instructions over the weekend.
@shurick81 - The first 2 cmds worked fine:
-
brew install --cask docker
-
docker run --rm -it m365pnp/powershell
But when running docker run --rm -it -v $(pwd):/home -w /home m365pnp/powershell
, I've got the following error: docker: invalid reference format.
When I run docker run --help
, I just got a list of the possible commands. Also note I'm not really experienced in Docker, so maybe I'm missing something.
Thanks for running the test @veronicageek!
After you get this error, could you check what this command outputs?
echo $(pwd)
Might it be the case that the path you are in contains spaces, like "/home/my best folder/etc"? Then I think I know the solution :)
@waldekmastykarz do you have any ideas?
Not off the top of my head, no :(
@shurick81 - hmm, in that case, can we please modify the article and specify that the instructions are for windows machines? We can later modify the article once we are able to get it working for Mac somehow? Same with all your other enhancement requests?
This way, at least we have something for Windows users.
Thanks for running the test @veronicageek!
After you get this error, could you check what this command outputs?
echo $(pwd)
Might it be the case that the path you are in contains spaces, like "/home/my best folder/etc"? Then I think I know the solution :)
@shurick81 - I've run the command but my path doesn't contain spaces. However, there's the /Users
which starts in uppercase. I think I had an issue before where it was complaining that the path should be lowercase only (?).
@shurick81 - hmm, in that case, can we please modify the article and specify that the instructions are for windows machines? We can later modify the article once we are able to get it working for Mac somehow? Same with all your other enhancement requests?
This way, at least we have something for Windows users.
Yes, that might be a way to go
@veronicageek
Could you also try
docker run --rm -it -v "$(pwd):/home" -w /home m365pnp/powershell
@shurick81 - Yes, adding the double quotes seems to have worked.
Also in your guide, the Get-ChildItems
is Get-ChildItem
(no plural) 🙂
Great, I updated the documentation, should I create a PR or someone needs to test more?
Closing this now, thanks @shurick81 for adding the docs !