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
update docker file for nanoserver 1709 release #5252
Conversation
TravisEz13
commented
Oct 27, 2017
- 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 |
There was a problem hiding this comment.
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%?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line was added
@@ -1,9 +1,32 @@ | |||
# escape=` | |||
FROM microsoft/nanoserver:latest | |||
# Args used by from statements must be defined here: | |||
ARG NanoServerVersion=1709 |
There was a problem hiding this comment.
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