-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce Dockerfiles for windowsservercore
Signed-off-by: Stefan Scherer <[email protected]>
- Loading branch information
1 parent
b5949cd
commit 5e7fd92
Showing
7 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,18 @@ | ||
FROM microsoft/windowsservercore | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
ENV NPM_CONFIG_LOGLEVEL info | ||
ENV NODE_VERSION 4.7.0 | ||
ENV NODE_SHA256 8b257f217ad882deffc2cd37d3aed7b8bbe57da1c4eb0b3b54cb529dff8ce811 | ||
|
||
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ | ||
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $env:NODE_SHA256) {exit 1} ; \ | ||
Expand-Archive node.zip -DestinationPath C:\ ; \ | ||
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs' ; \ | ||
New-Item $($env:APPDATA + '\npm') ; \ | ||
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \ | ||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) ; \ | ||
Remove-Item -Path node.zip | ||
|
||
CMD [ "node.exe" ] |
This file contains 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,10 @@ | ||
FROM node:4.7.0-windowsservercore | ||
|
||
RUN mkdir \app | ||
WORKDIR /app | ||
|
||
ONBUILD COPY package.json package.json | ||
ONBUILD RUN npm install ; Remove-Item $($env:APPDATA + '\npm-cache') -Force -Recurse ; Remove-Item $($env:TEMP + '\npm-*') -Force -Recurse | ||
ONBUILD COPY . . | ||
|
||
CMD [ "npm.cmd", "start" ] |
This file contains 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,18 @@ | ||
FROM microsoft/windowsservercore | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
ENV NPM_CONFIG_LOGLEVEL info | ||
ENV NODE_VERSION 6.9.2 | ||
ENV NODE_SHA256 3525201f28c2298953c4e0b03fe4fb080bf295ec9a722af2abbaa4ad53d3b491 | ||
|
||
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ | ||
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $env:NODE_SHA256) {exit 1} ; \ | ||
Expand-Archive node.zip -DestinationPath C:\ ; \ | ||
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs' ; \ | ||
New-Item $($env:APPDATA + '\npm') ; \ | ||
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \ | ||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) ; \ | ||
Remove-Item -Path node.zip | ||
|
||
CMD [ "node.exe" ] |
This file contains 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,10 @@ | ||
FROM node:6.9.2-windowsservercore | ||
|
||
RUN mkdir \app | ||
WORKDIR /app | ||
|
||
ONBUILD COPY package.json package.json | ||
ONBUILD RUN npm install ; Remove-Item $($env:APPDATA + '\npm-cache') -Force -Recurse ; Remove-Item $($env:TEMP + '\npm-*') -Force -Recurse | ||
ONBUILD COPY . . | ||
|
||
CMD [ "npm.cmd", "start" ] |
This file contains 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,18 @@ | ||
FROM microsoft/windowsservercore | ||
|
||
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"] | ||
|
||
ENV NPM_CONFIG_LOGLEVEL info | ||
ENV NODE_VERSION 7.2.1 | ||
ENV NODE_SHA256 960ce0e9da98650c0cb86f9550d558996b2e13cff4c376991e74a852babe76ac | ||
|
||
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \ | ||
if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $env:NODE_SHA256) {exit 1} ; \ | ||
Expand-Archive node.zip -DestinationPath C:\ ; \ | ||
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs' ; \ | ||
New-Item $($env:APPDATA + '\npm') ; \ | ||
$env:PATH = 'C:\nodejs;{0}\npm;{1}' -f $env:APPDATA, $env:PATH ; \ | ||
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine) ; \ | ||
Remove-Item -Path node.zip | ||
|
||
CMD [ "node.exe" ] |
This file contains 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,10 @@ | ||
FROM node:7.2.1-windowsservercore | ||
|
||
RUN mkdir \app | ||
WORKDIR /app | ||
|
||
ONBUILD COPY package.json package.json | ||
ONBUILD RUN npm install ; Remove-Item $($env:APPDATA + '\npm-cache') -Force -Recurse ; Remove-Item $($env:TEMP + '\npm-*') -Force -Recurse | ||
ONBUILD COPY . . | ||
|
||
CMD [ "npm.cmd", "start" ] |
This file contains 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,8 @@ | ||
docker build -t node:4.7.0-windowsservercore 4.7/windows/windowsservercore | ||
docker build -t node:4.7.0-windowsservercore-onbuild 4.7/windows/windowsservercore/onbuild | ||
|
||
docker build -t node:6.9.2-windowsservercore 6.9/windows/windowsservercore | ||
docker build -t node:6.9.2-windowsservercore-onbuild 6.9/windows/windowsservercore/onbuild | ||
|
||
docker build -t node:7.2.1-windowsservercore 7.2/windows/windowsservercore | ||
docker build -t node:7.2.1-windowsservercore-onbuild 7.2/windows/windowsservercore/onbuild |