mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Update nano server insider for new bulid (#4555)
This commit is contained in:
@@ -145,6 +145,8 @@ Install-Module <ModuleName> -Scope CurrentUser
|
||||
|
||||
#### Docker run requires full path
|
||||
|
||||
> **Note:** this is fixed in `10.0.16257.1000` of the NanoServer-Insider build. The powershell version of this should be released soon.
|
||||
|
||||
Due to [an issue with the container not picking up the path](https://github.com/Microsoft/Virtualization-Documentation/blob/live/virtualization/windowscontainers/quick-start/Insider-Known-Issues.md#build-16237), you must specify the path
|
||||
when running a command on the command line. For example, you would expect to be able to run:
|
||||
|
||||
|
||||
@@ -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,10 +21,28 @@ 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"]
|
||||
@@ -32,7 +50,7 @@ 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"]
|
||||
CMD ["PowerShell.exe"]
|
||||
|
||||
Reference in New Issue
Block a user