Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion release/preview/debian9/test-deps/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Docker image file that describes an Debian 9image with PowerShell and test dependencies
# Docker image file that describes an Debian 9 image with PowerShell and test dependencies
ARG BaseImage=mcr.microsoft.com/powershell:debian-9

FROM ${BaseImage}
Expand Down
6 changes: 3 additions & 3 deletions release/servicing/alpine/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG imageRepo=alpine
FROM ${imageRepo}:${fromTag} AS installer-env

# Define Args for the needed to add the package
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-alpine-x64.tar.gz
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=6
Expand All @@ -25,7 +25,7 @@ ENV PS_INSTALL_FOLDER=/opt/microsoft/powershell/$PS_INSTALL_VERSION
RUN mkdir -p ${PS_INSTALL_FOLDER}

# Unzip the Linux tar.gz
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER}
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you validate the -v works at the end?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It has been working

RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v


# Start a new stage so we lose all the tar.gz layers from the final image
FROM ${imageRepo}:${fromTag}
Expand Down Expand Up @@ -82,7 +82,7 @@ RUN apk add --no-cache \
}"

# Define args needed only for the labels
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG IMAGE_NAME=mcr.microsoft.com/powershell:alpine-3.8
ARG VCS_REF="none"

Expand Down
6 changes: 5 additions & 1 deletion release/servicing/alpine/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"tagTemplates": [
"#psversion#-alpine-#tag#"
],
"SkipGssNtlmSspTests": true
"SkipGssNtlmSspTests": true,
"SubImage": "test-deps",
"TestProperties": {
"size": 165
}
}
2 changes: 1 addition & 1 deletion release/servicing/arm32v7/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

FROM arm32v7/ubuntu:bionic

ENV PS_VERSION=6.1.2
ENV PS_VERSION=6.2.3
ENV PS_PACKAGE=powershell-${PS_VERSION}-linux-arm32.tar.gz
ENV PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}

Expand Down
11 changes: 6 additions & 5 deletions release/servicing/centos7/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ ARG imageRepo=centos

FROM ${imageRepo}:${fromTag} AS installer-env

ARG PS_VERSION=6.1.1
ARG PACKAGE_VERSION=6.1.1
ARG PS_VERSION=6.2.0
ARG PACKAGE_VERSION=6.2.0
ARG PS_PACKAGE=powershell-${PACKAGE_VERSION}-1.rhel.7.x86_64.rpm
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}

Expand All @@ -24,9 +24,10 @@ RUN curl -sSL ${PS_PACKAGE_URL} -o /tmp/powershell.rpm \
# Update now that we have epel-release
&& yum update -y \
# Install libraries for NTLM support
&& yum install -y gssntlmssp \
# less is required for help in powershell
less \
&& yum install -y \
gssntlmssp \
# less is required for help in powershell
less \
&& yum upgrade-minimal -y --security \
&& yum clean all \
&& localedef --charmap=UTF-8 --inputfile=en_US $LANG \
Expand Down
6 changes: 5 additions & 1 deletion release/servicing/centos7/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,9 @@
"osVersion": "CentOS 7",
"tagTemplates": [
"#psversion#-centos-#tag#"
]
],
"SubImage": "test-deps",
"TestProperties": {
"size": 550
}
}
5 changes: 2 additions & 3 deletions release/servicing/debian9/docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
# Docker image file that describes an Debian 9 image with PowerShell installed from Microsoft APT Repo
ARG fromTag=stretch
ARG fromTag=stretch-slim
ARG imageRepo=debian


FROM ${imageRepo}:${fromTag} AS installer-env

ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE=powershell_${PS_VERSION}-1.debian.9_amd64.deb
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}

Expand Down
4 changes: 2 additions & 2 deletions release/servicing/debian9/getLatestTag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
# return objects representing the tags we need to base the debian image on Docker

# The versions of debian we care about
$shortTags = @('stretch')
$shortTags = @('stretch-slim')

$parent = Join-Path -Path $PSScriptRoot -ChildPath '..'
$repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath '..'
$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
Import-Module $modulePath

Get-DockerTags -ShortTags $shortTags -Image "debian" -FullTagFilter 'stretch-\d{8}[\.\d{1}]?' -AlternativeShortTag '9'
Get-DockerTags -ShortTags $shortTags -Image "debian" -FullTagFilter 'stretch-\d{8}[\.\d{1}]?-slim' -AlternativeShortTag '9' -SkipShortTagFilter
6 changes: 5 additions & 1 deletion release/servicing/debian9/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"SkipGssNtlmSspTests": false,
"tagTemplates": [
"#psversion#-debian-#tag#"
]
],
"SubImage": "test-deps",
"TestProperties": {
"size": 314
}
}
10 changes: 0 additions & 10 deletions release/servicing/fedora28/meta.json

This file was deleted.

4 changes: 2 additions & 2 deletions release/servicing/nanoserver/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG NanoServerRepo=mcr.microsoft.com/windows/nanoserver
FROM ${InstallerRepo}:$InstallerVersion AS installer-env

# Arguments for installing PowerShell, must be defined in the container they are used
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0

ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v$PS_VERSION/PowerShell-$PS_VERSION-win-x64.zip

Expand Down Expand Up @@ -40,7 +40,7 @@ RUN Write-host "Verifying valid Version..."; `
FROM ${NanoServerRepo}:${fromTag}

ARG VCS_REF="none"
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG IMAGE_NAME=mcr.microsoft.com/powershell

LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" `
Expand Down
7 changes: 5 additions & 2 deletions release/servicing/nanoserver/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
"PackageFormat": "PowerShell-${PS_VERSION}-win-x64.zip",
"osVersion": "Nano Server, version ${fromTag}",
"shortTags": [
{"Tag": "1709"},
{"Tag": "1803"}
],
"tagTemplates": [
"#psversion#-nanoserver-#tag#"
],
"Base64EncodePackageUrl": true
"Base64EncodePackageUrl": true,
"UseAcr": true,
"TestProperties": {
"size": 1
}
}
21 changes: 16 additions & 5 deletions release/servicing/nanoserver1809/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ ARG NanoServerRepo=mcr.microsoft.com/windows/nanoserver

# Use server core as an installer container to extract PowerShell,
# As this is a multi-stage build, this stage will eventually be thrown away
FROM ${WindowsServerCoreRepo}:$WindowsServerCoreVersion AS installer-env
FROM ${InstallerRepo}:$InstallerVersion AS installer-env

# Arguments for installing PowerShell, must be defined in the container they are used
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0

ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v$PS_VERSION/PowerShell-$PS_VERSION-win-x64.zip

Expand Down Expand Up @@ -40,7 +40,7 @@ RUN Write-host "Verifying valid Version..."; `
FROM ${NanoServerRepo}:${fromTag}

ARG VCS_REF="none"
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG IMAGE_NAME=mcr.microsoft.com/powershell

LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" `
Expand Down Expand Up @@ -69,8 +69,19 @@ ENV ProgramFiles="C:\Program Files" `
# Set the default windows path so we can use it
WindowsPATH="C:\Windows\system32;C:\Windows"

# Set the path
ENV PATH="$WindowsPATH;${ProgramFiles}\PowerShell;"
### Begin workaround ###
# Note that changing user on nanoserver is not recommended
# See, https://docs.microsoft.com/en-us/virtualization/windowscontainers/manage-containers/container-base-images#base-image-differences
# But we are working around a bug introduced in the nanoserver image introduced in 1809
# Without this, PowerShell Direct will fail
# this command sholud be like this: https://github.com/PowerShell/PowerShell-Docker/blob/f81009c42c96af46aef81eb1515efae0ef29ad5f/release/preview/nanoserver/docker/Dockerfile#L76
USER ContainerAdministrator

# This is basically the correct code except for the /M
RUN setx PATH "%PATH%;%ProgramFiles%\PowerShell;" /M

USER ContainerUser
### End workaround ###

COPY --from=installer-env ["\\PowerShell\\", "$ProgramFiles\\PowerShell"]

Expand Down
3 changes: 2 additions & 1 deletion release/servicing/nanoserver1809/getLatestTag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,5 @@ $repoRoot = Join-Path -path (Join-Path -Path $parent -ChildPath '..') -ChildPath
$modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
Import-Module $modulePath

Get-DockerTags -ShortTags $shortTags -Image "mcr.microsoft.com/windows/nanoserver" -FullTagFilter '\d{4}_KB\d{7}(_amd64)?$' -Mcr
Get-DockerTags -ShortTags $shortTags -Image "mcr.microsoft.com/windows/nanoserver" -FullTagFilter '\d{4}[-_]KB\d{7}([\-_]amd64)?$' -Mcr

9 changes: 7 additions & 2 deletions release/servicing/nanoserver1809/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
"PackageFormat": "PowerShell-${PS_VERSION}-win-x64.zip",
"osVersion": "Nano Server, version ${fromTag}",
"shortTags": [
{"Tag": "1809"}
{"Tag": "1809"},
{"Tag": "1903"},
{"Tag": "1909"}
],
"tagTemplates": [
"#psversion#-nanoserver-#tag#"
],
"Base64EncodePackageUrl": true
"Base64EncodePackageUrl": true,
"TestProperties": {
"size": 1
}
}
6 changes: 3 additions & 3 deletions release/servicing/opensuse423/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ARG imageRepo=opensuse/leap
FROM ${imageRepo}:${fromTag} AS installer-env

# Define Args for the needed to add the package
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE=powershell-${PS_VERSION}-linux-x64.tar.gz
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}
ARG PS_INSTALL_VERSION=6
Expand All @@ -31,7 +31,7 @@ RUN zypper --non-interactive install \
ADD ${PS_PACKAGE_URL} /tmp/linux.tar.gz

# Unzip the Linux tar.gz
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER}
RUN tar zxf /tmp/linux.tar.gz -C ${PS_INSTALL_FOLDER} -v

# ------ Second stage ------
# Start a new stage so we lose all the tar.gz layers from the final image
Expand Down Expand Up @@ -82,7 +82,7 @@ RUN zypper --non-interactive update --skip-interactive \
}"

# Define args needed only for the labels
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG IMAGE_NAME=mcr.microsoft.com/powershell:opensuse-42.3
ARG VCS_REF="none"

Expand Down
1 change: 1 addition & 0 deletions release/servicing/opensuse423/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"tagTemplates": [
"#psversion#-opensuse-#tag#"
],
"SubImage": "test-deps",
"TestProperties": {
"size": 524
}
Expand Down
2 changes: 1 addition & 1 deletion release/servicing/ubuntu16.04/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG imageRepo=ubuntu

FROM ${imageRepo}:${fromTag} AS installer-env

ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE=powershell_${PS_VERSION}-1.ubuntu.16.04_amd64.deb
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}

Expand Down
6 changes: 5 additions & 1 deletion release/servicing/ubuntu16.04/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"tagTemplates": [
"#psversion#-ubuntu-#tag#"
],
"SkipGssNtlmSspTests": false
"SkipGssNtlmSspTests": false,
"TestProperties": {
"size": 395
},
"SubImage": "test-deps"
}
2 changes: 1 addition & 1 deletion release/servicing/ubuntu18.04/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ARG imageRepo=ubuntu

FROM ${imageRepo}:${fromTag} AS installer-env

ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE=powershell_${PS_VERSION}-1.ubuntu.18.04_amd64.deb
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE}

Expand Down
6 changes: 5 additions & 1 deletion release/servicing/ubuntu18.04/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,9 @@
"SkipGssNtlmSspTests": false,
"tagTemplates": [
"#psversion#-ubuntu-#tag#"
]
],
"TestProperties": {
"size": 355
},
"SubImage": "test-deps"
}
4 changes: 2 additions & 2 deletions release/servicing/windowsservercore/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG WindowsServerCoreRepo=mcr.microsoft.com/windows/servercore
# As this is a multi-stage build, this stage will eventually be thrown away
FROM ${WindowsServerCoreRepo}:${fromTag} AS installer-env

ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0
ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/PowerShell-${PS_VERSION}-win-x64.zip

SHELL ["C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]
Expand Down Expand Up @@ -65,7 +65,7 @@ CMD ["pwsh.exe"]

ARG IMAGE_NAME=mcr.microsoft.com/powershell:windowsservercore
ARG VCS_REF="none"
ARG PS_VERSION=6.1.0
ARG PS_VERSION=6.2.0

LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" `
readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" `
Expand Down
4 changes: 2 additions & 2 deletions release/servicing/windowsservercore/getLatestTag.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ $modulePath = Join-Path -Path $repoRoot -ChildPath 'tools\getDockerTags'
Import-Module $modulePath -Force

# The versions of nanoserver we care about
$shortTags = @('1709','1803','1809')
$shortTags = @('1803','1809','1903','1909')

Get-DockerTags -ShortTags $shortTags -Image "mcr.microsoft.com/windows/servercore" -FullTagFilter '\d{4}_KB\d{7}' -Mcr
Get-DockerTags -ShortTags $shortTags -Image "mcr.microsoft.com/windows/servercore" -FullTagFilter '\d{4}[-_]KB\d{7}' -Mcr
5 changes: 4 additions & 1 deletion release/servicing/windowsservercore/meta.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"Base64EncodePackageUrl": true,
"tagTemplates": [
"#psversion#-windowsservercore-#tag#"
]
],
"TestProperties": {
"size": 1
}
}
1 change: 1 addition & 0 deletions release/stable/alpine38/dependabot/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FROM node:10.15.3-alpine
Loading