-
Notifications
You must be signed in to change notification settings - Fork 234
/
Copy pathDockerFile
37 lines (28 loc) · 1.63 KB
/
DockerFile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# escape=`
#0.3.6 (no powershell 6)
FROM microsoft/dotnet-framework:4.7.1
LABEL maintainer='PowerShell Team <[email protected]>'
LABEL description="Build's PowerShell Editor Services"
SHELL ["C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]
COPY dockerInstall.psm1 containerFiles/dockerInstall.psm1
RUN Import-Module PackageManagement; `
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force; `
Set-PSRepository -Name PSGallery -InstallationPolicy Trusted | Out-Null; `
Invoke-WebRequest -Uri https://raw.githubusercontent.com/dotnet/cli/master/scripts/obtain/dotnet-install.ps1 -outfile C:/dotnet-install.ps1; `
C:/dotnet-install.ps1 -Channel Release -Version 2.1.4; `
Add-Path C:/Users/ContainerAdministrator/AppData/Local/Microsoft/dotnet; `
Install-Module InvokeBuild -MaximumVersion 5.1.0 -Scope CurrentUser -Force; `
Install-Module platyPS -RequiredVersion 0.9.0 -Scope CurrentUser -Force;
# Install .NET Framework 4.5.1 & 4.5.2 Developer Packs
RUN Import-Module ./containerFiles/dockerInstall.psm1; `
Install-ChocolateyPackage -PackageName netfx-4.5.1-devpack; `
Install-ChocolateyPackage -PackageName netfx-4.5.2-devpack;
# Copy build script over
COPY build.ps1 containerFiles/build.ps1
# Add env var for release build logic
ENV VSTS_BUILD=1
# Uncomment to debug locally
# RUN Import-Module ./containerFiles/dockerInstall.psm1; `
# Install-ChocolateyPackage -PackageName git -Executable git.exe; `
# git clone https://github.com/PowerShell/PowerShellEditorServices;
ENTRYPOINT ["C:\\windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe", "-command"]