-
Notifications
You must be signed in to change notification settings - Fork 156
Port debian and opensuse to preview channel #99
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
Merged
TravisEz13
merged 9 commits into
PowerShell:master
from
TravisEz13:port_stable_images_to_preview
Dec 13, 2018
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8ca89df
port debian and opensuse to preview channel
TravisEz13 5b7204c
Address PR comments
TravisEz13 554a54d
sync changes to stable images
TravisEz13 dfd6ac6
We can upload artifacts during PRs now
TravisEz13 9a2fe34
remove preview symlink from stable image
TravisEz13 d702294
fix package parameter
TravisEz13 4c3a697
fix psversion arg
kiazhi 8984262
fix second psversion arg
kiazhi a42db7c
address opensuse feedback
TravisEz13 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,87 @@ | ||
| # Docker image file that describes an Debian 8 image with PowerShell installed from Microsoft APT Repo | ||
| ARG fromTag=jessie | ||
| ARG imageRepo=debian | ||
|
|
||
|
|
||
| FROM ${imageRepo}:${fromTag} AS installer-env | ||
|
|
||
| ARG PS_VERSION=6.2.0-preview.3 | ||
| ARG PS_PACKAGE=powershell-preview_${PS_VERSION}-1.debian.8_amd64.deb | ||
| ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} | ||
|
|
||
| RUN echo ${PS_PACKAGE_URL} | ||
| # Download the Linux package and save it | ||
| ADD ${PS_PACKAGE_URL} /tmp/powershell.deb | ||
|
|
||
| # Define ENVs for Localization/Globalization | ||
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
| LC_ALL=en_US.UTF-8 \ | ||
| LANG=en_US.UTF-8 \ | ||
| # required to remove gdebi on debian 8 | ||
| SUDO_FORCE_REMOVE=yes \ | ||
| # set a fixed location for the Module analysis cache | ||
| PSModuleAnalysisCachePath=/PSModuleAnalysisCache/ModuleAnalysisCache | ||
|
|
||
| # Install dependencies and clean up | ||
| RUN apt-get update \ | ||
| && apt-get install -y \ | ||
| # less is required for help in powershell | ||
| less \ | ||
| # requied to setup the locale | ||
| locales \ | ||
| # required for SSL | ||
| ca-certificates \ | ||
| # simplifies deb file install | ||
| gdebi \ | ||
| && gdebi --n /tmp/powershell.deb \ | ||
| # gdebi isn't needed anymore remove it | ||
| && apt-get purge -y gdebi \ | ||
| # remove any unused dependecies | ||
| && apt-get autoremove -y \ | ||
| # upgrade all packages | ||
| && apt-get dist-upgrade -y \ | ||
| # clean the cache | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| # enable en_US.UTF-8 locale | ||
| && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen \ | ||
| # generate locale | ||
| && locale-gen && update-locale \ | ||
| # remove powershell package | ||
| && rm /tmp/powershell.deb \ | ||
| && ln -sf /opt/microsoft/powershell/6-preview/pwsh /usr/bin/pwsh \ | ||
| # intialize powershell module cache | ||
| && pwsh \ | ||
| -NoLogo \ | ||
| -NoProfile \ | ||
| -Command " \ | ||
| \$ErrorActionPreference = 'Stop' ; \ | ||
| \$ProgressPreference = 'SilentlyContinue' ; \ | ||
| while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { \ | ||
| Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \ | ||
| Start-Sleep -Seconds 6 ; \ | ||
| }" | ||
|
|
||
| # Define args needed only for the labels | ||
| ARG VCS_REF="none" | ||
| ARG IMAGE_NAME=mcr.microsoft.com/powershell:debian-8 | ||
|
|
||
| LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" \ | ||
| readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \ | ||
| description="This Dockerfile will install the latest release of PowerShell." \ | ||
| org.label-schema.usage="https://github.com/PowerShell/PowerShell/tree/master/docker#run-the-docker-image-you-built" \ | ||
| org.label-schema.url="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \ | ||
| org.label-schema.vcs-url="https://github.com/PowerShell/PowerShell-Docker" \ | ||
| org.label-schema.name="powershell" \ | ||
| org.label-schema.vendor="PowerShell" \ | ||
| org.label-schema.version=${PS_VERSION} \ | ||
| org.label-schema.schema-version="1.0" \ | ||
| org.label-schema.vcs-ref=${VCS_REF} \ | ||
| org.label-schema.docker.cmd="docker run ${IMAGE_NAME} pwsh -c '$psversiontable'" \ | ||
| org.label-schema.docker.cmd.devel="docker run ${IMAGE_NAME}" \ | ||
| org.label-schema.docker.cmd.test="docker run ${IMAGE_NAME} pwsh -c Invoke-Pester" \ | ||
| org.label-schema.docker.cmd.help="docker run ${IMAGE_NAME} pwsh -c Get-Help" | ||
|
|
||
| # Use PowerShell as the default shell | ||
| # Use array to avoid Docker prepending /bin/sh -c | ||
| CMD [ "pwsh" ] | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| # return objects representing the tags we need to base the debian image on | ||
|
|
||
| # The versions of debian we care about | ||
| $shortTags = @('jessie') | ||
|
|
||
| $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 'jessie-\d{8}[\.\d{1}]?' -AlternativeShortTag '8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "IsLinux" : true, | ||
| "UseLinuxVersion" : false, | ||
| "PackageFormat": "powershell-preview_${PS_VERSION}-1.debian.8_amd64.deb" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [ | ||
| "#psversion#-debian-#tag#", | ||
| "preview-debian-#shorttag#" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| # Docker image file that describes an Debian 9 image with PowerShell installed from Microsoft APT Repo | ||
| ARG fromTag=stretch | ||
| ARG imageRepo=debian | ||
|
|
||
|
|
||
| FROM ${imageRepo}:${fromTag} AS installer-env | ||
|
|
||
| ARG PS_VERSION=6.2.0-preview.3 | ||
| ARG PS_PACKAGE=powershell-preview_${PS_VERSION}-1.debian.9_amd64.deb | ||
| ARG PS_PACKAGE_URL=https://github.com/PowerShell/PowerShell/releases/download/v${PS_VERSION}/${PS_PACKAGE} | ||
|
|
||
| RUN echo ${PS_PACKAGE_URL} | ||
| # Download the Linux package and save it | ||
| ADD ${PS_PACKAGE_URL} /tmp/powershell.deb | ||
|
|
||
| # Define ENVs for Localization/Globalization | ||
| ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \ | ||
| LC_ALL=en_US.UTF-8 \ | ||
| LANG=en_US.UTF-8 \ | ||
| # set a fixed location for the Module analysis cache | ||
| PSModuleAnalysisCachePath=/PSModuleAnalysisCache/ModuleAnalysisCache | ||
|
|
||
| # Install dependencies and clean up | ||
| RUN apt-get update \ | ||
| && apt install -y /tmp/powershell.deb \ | ||
| && apt-get install -y \ | ||
| # less is required for help in powershell | ||
| less \ | ||
| # requied to setup the locale | ||
| locales \ | ||
| # required for SSL | ||
| ca-certificates \ | ||
| && apt-get dist-upgrade -y \ | ||
| && apt-get clean \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
| # enable en_US.UTF-8 locale | ||
| && sed -i 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g' /etc/locale.gen \ | ||
| # generate locale | ||
| && locale-gen && update-locale \ | ||
| # remove powershell package | ||
| && rm /tmp/powershell.deb \ | ||
| && ln -sf /opt/microsoft/powershell/6-preview/pwsh /usr/bin/pwsh \ | ||
| # intialize powershell module cache | ||
| && pwsh \ | ||
| -NoLogo \ | ||
| -NoProfile \ | ||
| -Command " \ | ||
| \$ErrorActionPreference = 'Stop' ; \ | ||
| \$ProgressPreference = 'SilentlyContinue' ; \ | ||
| while(!(Test-Path -Path \$env:PSModuleAnalysisCachePath)) { \ | ||
| Write-Host "'Waiting for $env:PSModuleAnalysisCachePath'" ; \ | ||
| Start-Sleep -Seconds 6 ; \ | ||
| }" | ||
|
|
||
| # Define args needed only for the labels | ||
| ARG VCS_REF="none" | ||
| ARG IMAGE_NAME=mcr.microsoft.com/powershell:debian-9 | ||
|
|
||
| LABEL maintainer="PowerShell Team <powershellteam@hotmail.com>" \ | ||
| readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \ | ||
| description="This Dockerfile will install the latest release of PowerShell." \ | ||
| org.label-schema.usage="https://github.com/PowerShell/PowerShell/tree/master/docker#run-the-docker-image-you-built" \ | ||
| org.label-schema.url="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md" \ | ||
| org.label-schema.vcs-url="https://github.com/PowerShell/PowerShell-Docker" \ | ||
| org.label-schema.name="powershell" \ | ||
| org.label-schema.vendor="PowerShell" \ | ||
| org.label-schema.version=${PS_VERSION} \ | ||
| org.label-schema.schema-version="1.0" \ | ||
| org.label-schema.vcs-ref=${VCS_REF} \ | ||
| org.label-schema.docker.cmd="docker run ${IMAGE_NAME} pwsh -c '$psversiontable'" \ | ||
| org.label-schema.docker.cmd.devel="docker run ${IMAGE_NAME}" \ | ||
| org.label-schema.docker.cmd.test="docker run ${IMAGE_NAME} pwsh -c Invoke-Pester" \ | ||
| org.label-schema.docker.cmd.help="docker run ${IMAGE_NAME} pwsh -c Get-Help" | ||
|
|
||
| # Use PowerShell as the default shell | ||
| # Use array to avoid Docker prepending /bin/sh -c | ||
| CMD [ "pwsh" ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Copyright (c) Microsoft Corporation. All rights reserved. | ||
| # Licensed under the MIT License. | ||
|
|
||
| # return objects representing the tags we need to base the debian image on Docker | ||
|
|
||
| # The versions of debian we care about | ||
| $shortTags = @('stretch') | ||
|
|
||
| $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 '8' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "IsLinux" : true, | ||
| "UseLinuxVersion" : false, | ||
| "PackageFormat": "powershell-preview_${PS_VERSION}-1.debian.9_amd64.deb" | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| [ | ||
| "#psversion#-debian-#tag#", | ||
| "preview-debian-#shorttag#" | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.