Skip to content
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

Merged
merged 3 commits into from Oct 27, 2017

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

@@ -1,9 +1,32 @@
# 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.

None yet

3 participants