chore(ci): switch Windows containers (#2662)

Cirrus CI got some optimizations for containers based of `microsoft/windowsservercore:latest`.

Now startup time for windows builds is around 1:30 seconds instead of around 4 minutes.

to: @aslushnikov
This commit is contained in:
Fedor Korotkov 2018-06-01 18:15:16 -04:00 committed by Andrey Lushnikov
parent 9904da262e
commit 85d5a3348c
3 changed files with 13 additions and 18 deletions

View File

@ -1,15 +1,12 @@
FROM microsoft/windowsservercore:1709
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
FROM microsoft/windowsservercore:latest
ENV NODE_VERSION 6.12.3
RUN netsh interface ipv4 set subinterface 'vEthernet (Ethernet)' mtu=1460 store=persistent
RUN setx /m PATH "%PATH%;C:\nodejs"
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
RUN powershell -Command \
netsh interface ipv4 show interfaces ; \
netsh interface ipv4 set subinterface 18 mtu=1460 store=persistent ; \
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
SHELL ["cmd", "/S", "/C"]
RUN setx /m PATH "%PATH%;C:\nodejs"

View File

@ -1,15 +1,11 @@
FROM microsoft/windowsservercore:1709
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
FROM microsoft/windowsservercore:latest
ENV NODE_VERSION 7.10.1
RUN netsh interface ipv4 set subinterface 'vEthernet (Ethernet)' mtu=1460 store=persistent
RUN setx /m PATH "%PATH%;C:\nodejs"
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
RUN powershell -Command \
netsh interface ipv4 set subinterface 18 mtu=1460 store=persistent ; \
Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
Expand-Archive node.zip -DestinationPath C:\ ; \
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
SHELL ["cmd", "/S", "/C"]
RUN setx /m PATH "%PATH%;C:\nodejs"

View File

@ -6,6 +6,7 @@ task:
- name: node6 (windows)
windows_container:
dockerfile: .ci/node6/Dockerfile.windows
os_version: 2016
- name: node6 (linux)
container:
dockerfile: .ci/node6/Dockerfile.linux
@ -18,6 +19,7 @@ task:
- name: node7 (windows)
windows_container:
dockerfile: .ci/node7/Dockerfile.windows
os_version: 2016
- name: node7 (linux)
container:
dockerfile: .ci/node7/Dockerfile.linux