Refactoring Linux Nighly Dockerfiles to in-line Bootstrap.ps1 code

Provides simpler usability by making the dockerfiles self-contained.
This commit is contained in:
Bryce Milton - MSFT
2016-11-11 21:02:52 -08:00
committed by Sergei Vorobev
parent 69c9228671
commit 8bc8930959
9 changed files with 35 additions and 49 deletions
-8
View File
@@ -1,8 +0,0 @@
# This is intended to be used inside Docker containers
git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch
Set-Location PowerShell
Import-Module ./build.psm1
Start-PSBootstrap -Package -NoSudo
Start-PSBuild -Crossgen
Start-PSPackage
+11 -3
View File
@@ -1,9 +1,17 @@
FROM microsoft/powershell:centos7
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
LABEL Description="This Dockerfile will install and build the latest release of PS."
ARG fork=PowerShell
ARG branch=master
SHELL ["powershell", "-command"]
RUN git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch; \
Set-Location PowerShell; \
Import-Module ./build.psm1; \
Start-PSBootstrap -Package -NoSudo; \
Start-PSBuild -Crossgen; \
Start-PSPackage;
COPY bootstrap.ps1 /
RUN powershell -f bootstrap.ps1 \
&& yum install -y PowerShell/powershell*.rpm
SHELL ["/bin/sh", "-c"]
RUN yum install -y PowerShell/powershell*.rpm
-8
View File
@@ -1,8 +0,0 @@
# This is intended to be used inside Docker containers
git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch
Set-Location PowerShell
Import-Module ./build.psm1
Start-PSBootstrap -Package -NoSudo
Start-PSBuild -Crossgen
Start-PSPackage
+11 -3
View File
@@ -1,9 +1,17 @@
FROM microsoft/powershell:ubuntu14.04
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
LABEL Description="This Dockerfile will install and build the latest release of PS."
ARG fork=PowerShell
ARG branch=master
SHELL ["powershell", "-command"]
RUN git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch; \
Set-Location PowerShell; \
Import-Module ./build.psm1; \
Start-PSBootstrap -Package -NoSudo; \
Start-PSBuild -Crossgen; \
Start-PSPackage;
COPY bootstrap.ps1 /
RUN powershell -f bootstrap.ps1 \
&& dpkg -i PowerShell/powershell*.deb
SHELL ["/bin/sh", "-c"]
RUN dpkg -i PowerShell/powershell*.deb
-8
View File
@@ -1,8 +0,0 @@
# This is intended to be used inside Docker containers
git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch
Set-Location PowerShell
Import-Module ./build.psm1
Start-PSBootstrap -Package -NoSudo
Start-PSBuild -Crossgen
Start-PSPackage
+11 -3
View File
@@ -1,9 +1,17 @@
FROM microsoft/powershell:ubuntu16.04
MAINTAINER Andrew Schwartzmeyer <andschwa@microsoft.com>
LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
LABEL Description="This Dockerfile will install and build the latest release of PS."
ARG fork=PowerShell
ARG branch=master
SHELL ["powershell", "-command"]
RUN git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch; \
Set-Location PowerShell; \
Import-Module ./build.psm1; \
Start-PSBootstrap -Package -NoSudo; \
Start-PSBuild -Crossgen; \
Start-PSPackage;
COPY bootstrap.ps1 /
RUN powershell -f bootstrap.ps1 \
&& dpkg -i PowerShell/powershell*.deb
SHELL ["/bin/sh", "-c"]
RUN dpkg -i PowerShell/powershell*.deb
-8
View File
@@ -1,8 +0,0 @@
# This is intended to be used inside Docker containers
git clone --recursive https://github.com/$env:fork/PowerShell.git -b $env:branch
Set-Location PowerShell
Import-Module ./build.psm1
Start-PSBootstrap -Package -NoSudo
Start-PSBuild -Crossgen
Start-PSPackage
+1 -4
View File
@@ -2,7 +2,7 @@
FROM microsoft/nanoserver
MAINTAINER brycem@microsoft.com
LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
LABEL Description="This Dockerfile will install and build the latest release of PS on NanoServer."
LABEL Description="This Dockerfile will install the latest release of PS."
ARG POWERSHELL_ZIP=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/powershell-6.0.0-alpha.12-win10-x64.zip
ARG POWERSHELL_SHA256=257D5F081C112713DF17F6D0E4CBC794E5099664EDA8DBC543B996915834D5CE
@@ -35,9 +35,6 @@ RUN $ErrorActionPreference='Stop'; `
New-Item -Type SymbolicLink -Path $PsFolder\ -Name Core -Value $PsFolder `
} else { throw 'Installation failed! See c:\Dockerfile.log' } ;
# Cleanup %POWERSHELL_SHA256%
ENV POWERSHELL_SHA256=
# Verify New Powershell.exe runs
SHELL ["C:\\Program Files\\PowerShell\\Core\\PowerShell.exe", "-command"]
RUN Start-Transcript -path C:\Dockerfile.log -append -IncludeInvocationHeader ; `
+1 -4
View File
@@ -2,7 +2,7 @@
FROM microsoft/windowsservercore
MAINTAINER brycem@microsoft.com
LABEL Readme.md="https://github.com/PowerShell/PowerShell/blob/master/docker/README.md"
LABEL Description="This Dockerfile will install and build the latest release of PS on WindowsServerCore."
LABEL Description="This Dockerfile will install the latest release of PS."
ARG POWERSHELL_MSI=https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.12/PowerShell_6.0.0.12-alpha.12-win10-x64.msi
ARG POWERSHELL_SHA256=F3C3F3276462588E24BFE197DAA8795140E37557596861126D54462561C98671
@@ -35,9 +35,6 @@ RUN $ErrorActionPreference='Stop'; `
New-Item -Type SymbolicLink -Path $Env:ProgramFiles\PowerShell\ -Name Core -Value $psexe.DirectoryName `
} else { throw 'Installation failed! See c:\PowerShell-win10-x64.msi.log' } ;
# Cleanup %POWERSHELL_SHA256%
ENV POWERSHELL_SHA256=
# Verify New Powershell.exe runs
SHELL ["C:\\Program Files\\PowerShell\\Core\\PowerShell.exe", "-command"]
RUN Start-Transcript -path C:\Dockerfile.log -append -IncludeInvocationHeader ; `