SOLVED
Home

How are you expected to adminster nanoserver inside container if powershell is removed?

Highlighted
Gregory Suvalian
Occasional Contributor

How are you expected to adminster nanoserver inside container if powershell is removed?

As per release notes nano server was optimized by removing powershell from it. How are you expected to administer it (or build using dockerfile) for that matter if no powershell is available?

  • Containers
8 Replies

RE: How are you expected to adminster nanoserver inside container if powershell is removed?

good question

Re: How are you expected to adminster nanoserver inside container if powershell is removed?

You can always install PowerShell when creating your own Nano image.

RE: How are you expected to adminster nanoserver inside container if powershell is removed?

https://msdn.microsoft.com/en-us/library/mt708805(v=vs.85).aspx "Nano Server does not support a local session, it must be accessed remotely."

Re: RE: How are you expected to adminster nanoserver inside container if powershell is removed?

Yes, so once you access nanoserver remotely, what do you on console if there is no powershell?

Solution

Re: How are you expected to adminster nanoserver inside container if powershell is removed?

With a Dockerfile, the multi-stage builds introduced in Docker 17.05 and COPY deployment.

 

Here is an example to put Node.js into a nanoserver-insider image without PowerShell: https://github.com/StefanScherer/dockerfiles-windows/blob/07cedcf2cc93e669bba9c961121feda6f43dab59/n...

 

 

If you need PowerShell and can't deploy with just COPY instructions and simple environment changes with setx.exe, then you can use "FROM microsoft/nanoserver-insider-powershell" which is slighly bigger than the "microsoft/nanoserver-insider" image.

 

Re: How are you expected to adminster nanoserver inside container if powershell is removed?

I did not realize that there is separate image with powershell baked in. Based on release anouncement it looked like that there will be no base images anymore with powershell.

Re: How are you expected to adminster nanoserver inside container if powershell is removed?

Hi Gregory !
Now we can use a version of nano server container with powershell, but I have not good news about, It's not very useful that we can't connect to a remote PSsession to interact with containers. It will be a easier way to work with it.
Hope Windows Server Team light us with this.

Re: How are you expected to adminster nanoserver inside container if powershell is removed?

That's a great job Stefan ! Congrats !
I think your solution it's great, but if we want to deploy/install a role?
I'm trying to deploy IIS and I have not luck at all, no PS session, no dism, not nanoserverpackage, well nothing seems to work here. Size is important, sure, but it have to be useful and easy to deal with it, otherwise sysadmins does not interesting at all.
Thanks for your post and job.
Related Conversations
No Assignments Tab in Microsoft Teams
Nick Davies  in  Microsoft Teams  on
23 Replies
Create private channel in a team
Catalin Prata  in  Microsoft Teams  on
25 Replies
Excel crashing
Eric Maillebiau  in  Microsoft Teams  on
5 Replies
Accessing Team Calendar on iPhone
Abbas Jaffar Ali  in  Microsoft Teams  on
8 Replies
Teams Files Backup and Restore
Vivek Desai  in  Microsoft Teams  on
14 Replies
Inserting links
Jessica Carver  in  Microsoft Teams  on
12 Replies