forked from PowerShell/vscode-powershell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerFile
34 lines (25 loc) · 1.3 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
# 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; `
Install-Module InvokeBuild -MaximumVersion 5.1.0 -Scope CurrentUser -Force; `
Install-Module platyPS -RequiredVersion 0.9.0 -Scope CurrentUser -Force;
# Install Nodejs
RUN Import-Module ./containerFiles/dockerInstall.psm1; `
Install-ChocolateyPackage -PackageName nodejs-lts -Executable node.exe;
# Copy build script over
COPY build.ps1 containerFiles/build.ps1
# Add an environment variable for build versioning
ENV VSTS_BUILD=1
ENV VSTS_BUILD_VERSION=1.8.3
# 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"]