Skip to content

Conversation

@TravisEz13
Copy link
Member

  • merge nanoserver-insider image into main nanoserver docker file
  • add argument validation
  • fix minor issues

Throw [String]$('['+$PSVersionTable.PSEdition+'] is not [Core]!') ; `
} ;
# Copy Powershell Core from the installer containter
ENV ProgramFiles C:\Program Files
Copy link
Member

@mirichmo mirichmo Oct 27, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are quotes needed here around c:\Program Files? A bigger question that I don't quite understand: Why are you defining it here and not using $env:ProgramFiles or %ProgramFiles%?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, this is a tested an working file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are only two changes to the file. I added comments for the two changes. The file which was deleted, otherwise replaced the older file.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about my second question? I added it a little later via edit

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

docker itself cannot use the container environment variables. This is used in docker commands.


SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]

RUN if (!($env:PS_VERSION -match '^\d+\.\d+\.\d+(-\w+\.\d+)?$' )) {throw ('PS_Version ({0}) must match the regex "^\d+\.\d+\.\d+(-\w+\.\d+)?$"' -f $env:PS_VERSION)}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line was added

# escape=`
FROM microsoft/nanoserver:latest
# Args used by from statements must be defined here:
ARG NanoServerVersion=1709
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the values for these first arguments changed

@TravisEz13 TravisEz13 merged commit 14af3e1 into PowerShell:master Oct 27, 2017
@TravisEz13 TravisEz13 deleted the nanoserverUpdate branch October 27, 2017 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants