From 64ace14b15ee196fbe59fa1ff1a1b684bcf072ce Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 11 Aug 2017 12:40:59 -0700 Subject: [PATCH 1/4] Update dockerfile to support new nanoserver-insider build --- docker/release/nanoserver-insider/Dockerfile | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/docker/release/nanoserver-insider/Dockerfile b/docker/release/nanoserver-insider/Dockerfile index 62b2b16fc79..044da009de4 100755 --- a/docker/release/nanoserver-insider/Dockerfile +++ b/docker/release/nanoserver-insider/Dockerfile @@ -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,6 +21,11 @@ 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 " LABEL readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" LABEL description="This Dockerfile will install the latest release of PS." @@ -32,7 +37,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"] From 2d5b636866fec65bede25426d911ec08d9bf62b7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 11 Aug 2017 12:42:04 -0700 Subject: [PATCH 2/4] add http://label-schema.org/rc1/ labels --- docker/release/nanoserver-insider/Dockerfile | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/docker/release/nanoserver-insider/Dockerfile b/docker/release/nanoserver-insider/Dockerfile index 044da009de4..860f1620b92 100755 --- a/docker/release/nanoserver-insider/Dockerfile +++ b/docker/release/nanoserver-insider/Dockerfile @@ -29,7 +29,20 @@ ARG IMAGE_NAME=microsoft/nanoserver-insider-powershell LABEL maintainer="PowerShell Team " 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"] From e9ec1cfd9b6afaa3901d5a00c388406ef1ddfdf3 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 11 Aug 2017 16:50:42 -0700 Subject: [PATCH 3/4] Add note that issue is fixed soon --- docker/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docker/README.md b/docker/README.md index c90d0b85c6b..85dce86862b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -145,6 +145,8 @@ Install-Module -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: From 5ea8efeb6d03a404f1451efc6fd2b12278c323dc Mon Sep 17 00:00:00 2001 From: Dongbo Wang Date: Fri, 11 Aug 2017 17:18:31 -0700 Subject: [PATCH 4/4] Make the note a quote. It's more eye-catching --- docker/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/README.md b/docker/README.md index 85dce86862b..4d62af83b9b 100644 --- a/docker/README.md +++ b/docker/README.md @@ -145,7 +145,7 @@ Install-Module -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. +> **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: