-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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 nano server insider for new bulid #4555
Changes from all commits
64ace14
2d5b636
e9ec1cf
5ea8efe
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# escape=` | ||
# Args used by from statements must be defined here: | ||
ARG NanoServerVersion=10.0.16237.1001 | ||
ARG WindowsServerCoreVersion=10.0.16237.1001 | ||
ARG NanoServerVersion=10.0.16257.1000 | ||
ARG WindowsServerCoreVersion=10.0.16257.1000 | ||
ARG WindowsServerCoreRepo=microsoft/windowsservercore-insider | ||
ARG NanoServerRepo=microsoft/nanoserver-insider | ||
|
||
|
@@ -21,18 +21,36 @@ RUN Expand-Archive powershell.zip -DestinationPath \PowerShell | |
|
||
# Install PowerShell into NanoServer | ||
FROM ${NanoServerRepo}:$NanoServerVersion | ||
|
||
ARG VCS_REF="none" | ||
ARG PS_VERSION=6.0.0-beta.5 | ||
ARG IMAGE_NAME=microsoft/nanoserver-insider-powershell | ||
|
||
LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" | ||
LABEL readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" | ||
LABEL description="This Dockerfile will install the latest release of PS." | ||
|
||
# Usage on URL to Usage | ||
LABEL org.label-schema.usage="https://github.com/PowerShell/PowerShell/tree/master/docker#run-the-docker-image-you-built" | ||
LABEL org.label-schema.url="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" | ||
LABEL org.label-schema.vcs-url="https://github.com/PowerShell/PowerShell" | ||
# Image friendly name | ||
LABEL org.label-schema.name="nanoserver-insider-powershell" | ||
LABEL org.label-schema.vcs-ref=${VCS_REF} | ||
LABEL org.label-schema.vendor="PowerShell" | ||
LABEL org.label-schema.version=${PS_VERSION} | ||
LABEL org.label-schema.schema-version="1.0" | ||
LABEL org.label-schema.docker.cmd="docker run ${IMAGE_NAME} powershell -c '$psversiontable'" | ||
LABEL org.label-schema.docker.cmd.devel="docker run ${IMAGE_NAME}" | ||
LABEL org.label-schema.docker.cmd.test="docker run ${IMAGE_NAME} powershell -c Invoke-Pester" | ||
LABEL org.label-schema.docker.cmd.help="docker run ${IMAGE_NAME} powershell -c Get-Help" | ||
# Copy Powershell from the installer containter | ||
ENV ProgramFiles C:\Program Files | ||
COPY --from=installer-env ["\\PowerShell\\", "$ProgramFiles\\PowerShell"] | ||
|
||
# Persist %PSCORE% ENV variable for user convenience | ||
ENV PSCORE="$ProgramFiles\PowerShell\PowerShell.exe" | ||
|
||
# setx /M fails on nanoserver-insider, setting the user path | ||
# Set the path | ||
RUN setx PATH "%PATH%;%ProgramFiles%\PowerShell" | ||
|
||
CMD ["C:\\Program Files\\PowerShell\\PowerShell.exe"] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In docker/README.md:
Looks like the PATH issue has been fixed, so the document should be updated. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I added a note that it will be fixed soon. I have to setup a build machine matching the exact build of the container, which might take me some time. |
||
CMD ["PowerShell.exe"] |
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.
Just curious,
setx /M
is not necessary on nanoserver because it's a single user OS, correct?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.
correct, they fixed the container to use the per user path.