dotnet-docker icon indicating copy to clipboard operation
dotnet-docker copied to clipboard

Please support PowerShell core on SDK images

Open AceHack opened this issue 8 years ago • 62 comments

Please add powershell core on both linux and windows SDK images

AceHack avatar Jan 22 '18 04:01 AceHack

Please also make this the default cmd handler in the image

AceHack avatar Jan 23 '18 03:01 AceHack

We would like to hear more requests from the community on this before making a change. Making the Powershell the default SHELL would not be something we would consider as we feel it is not what the Linux community would expect.

MichaelSimons avatar Jan 23 '18 22:01 MichaelSimons

Would it be possible to create an alternative tag/image that has PowerShell as the default? This would make it so I would not have to create my own base image for all my apps that does the same. Thanks.

AceHack avatar Jan 24 '18 00:01 AceHack

If there is a strong demand for such images then it would be something we would consider. In general we try to limit the number of images permutations as deciphering the differences between all of the images can be difficult.

MichaelSimons avatar Jan 24 '18 00:01 MichaelSimons

Just to give a little context, I use PowerShell so I can create one Dockerfile that works on both Windows and Linux containers even though in many cases the builds are complicated and require scripting. Before I had to maintain two different Dockerfiles and script the same actions in two different languages. Thanks.

AceHack avatar Jan 24 '18 01:01 AceHack

Assume we did add powershell to our SDK images. Why would you need the default shell to be powershell in the dotnet images to enable your scenario?

richlander avatar Jan 24 '18 06:01 richlander

Because on Windows the executable name is powershell and on Linux it’s pwsh. So at a minimum I would have to have two base images that set the default shell accordingly and then the multiarch tag. Then all my services would need to reference the multiarch tag.

AceHack avatar Jan 24 '18 15:01 AceHack

I can see how that would be nice, but it's well within your capability to solve. It's not so challenging that it's worth us creating a whole series of additional images to update. We'd have to create ~20 new images to make that work.

richlander avatar Jan 24 '18 21:01 richlander

If you add powershell to the base images for the sdk but don't make it the default could you run the following

#!/bin/bash ln -s /usr/bin/pwsh /usr/bin/powershell

This will alias pwsh as powershell and I should be able to set the default myself in a way that would work on both OSs in a single docker file.

Thanks.

AceHack avatar Jan 25 '18 07:01 AceHack

That may be a middle ground.

First, we need more requests to add powershell. This request is the first one I am aware of.

richlander avatar Jan 26 '18 01:01 richlander

Same request to add powershell :)


From: Rich Lander [email protected] Sent: Thursday, January 25, 2018 5:36:03 PM To: dotnet/dotnet-docker Cc: Subscribed Subject: Re: [dotnet/dotnet-docker] Please support PowerShell core on SDK images (#360)

That may be a middle ground.

First, we need more requests to add powershell. This request is the first one I am aware of.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/dotnet/dotnet-docker/issues/360#issuecomment-360657996, or mute the threadhttps://github.com/notifications/unsubscribe-auth/Ady1wL6gUWihKFAPv6dO7ljuebjwut-6ks5tOSwDgaJpZM4RmKQZ.

itz1508 avatar Jan 26 '18 13:01 itz1508

I second @AceHack on supporting powershell on Linux. It just enable a lot of possibility for development. It also help us make a stronger business case to adopt container technology in our company.

yuhuazhong avatar Jan 26 '18 20:01 yuhuazhong

Same here...this is a much-needed feature for consistency of experiences.

kz1000fan avatar Jan 26 '18 20:01 kz1000fan

I would like this feature too.

ericrini avatar Jan 26 '18 21:01 ericrini

I vote for this feature. It will help our company adopt AKS.

tkring avatar Jan 26 '18 23:01 tkring

@richlander looking at PowerShell core 6.0.1 it's even called pwsh when installed on windows nanoserver-1709 so just including it would be great! Thanks.

AceHack avatar Jan 28 '18 03:01 AceHack

Anyone know how big it is once installed?

richlander avatar Jan 28 '18 05:01 richlander

I'm working on creating a base image myself for nanoserver-1709 and stretch, I'll send the link once I'm done.

AceHack avatar Jan 28 '18 05:01 AceHack

Please do send the link. I'm most interested in what docker history says, so please (for now) add powshell by itself so that it creates a distinct layer.

richlander avatar Jan 28 '18 05:01 richlander

@richlander I have not made the multi-arch tag yet, I'll do that tomorrow but here they are on docker hub. https://hub.docker.com/r/acehack/dotnet/tags/

Also here are the source Dockerfiles. https://github.com/AceHack/dotnet-docker-powershell

If you want me to make any changes to help you out just let me know. Thanks.

AceHack avatar Jan 28 '18 10:01 AceHack