Skip to content

Commit 764aac8

Browse files
Cr 15251 (#107)
* added windows dockerfile * container logger start with retry * improving windows dockerfile * wip * bump * fix min timeout * fixing promise-retry usage * wip * fixing attach strategy stderr * fixed tests * changed logger strategy fallback * Fixed is ready script and replaced with js script * fixed waitUntilFinished script to work on windows * making waitUntilFinished platform independant * fix tests * added waitingForStart container status to make isReady work for logs strategy
1 parent 8794f20 commit 764aac8

21 files changed

+370
-372
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,4 @@ state.json
99
*.log
1010
.idea
1111
.vscode
12+
lib/manual-test.js

Dockerfile.aarch64

-76
This file was deleted.

Dockerfile.windows

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
ARG OS_RELEASE
2+
3+
FROM mcr.microsoft.com/windows/servercore:${OS_RELEASE} as download
4+
5+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
6+
7+
ENV GIT_VERSION 2.39.0
8+
ENV NODE_VERSION 16.18.1
9+
ENV YARN_VERSION 1.22.19
10+
11+
# Download and install git
12+
RUN Invoke-WebRequest $('https://github.com/git-for-windows/git/releases/download/v{0}.windows.1/MinGit-{0}-64-bit.zip' -f $env:GIT_VERSION) -OutFile 'MinGit.zip' -UseBasicParsing ; \
13+
Expand-Archive c:\MinGit.zip -DestinationPath c:\MinGit; \
14+
$env:PATH = $env:PATH + ';C:\MinGit\cmd\;C:\MinGit\cmd'; \
15+
Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $env:PATH
16+
17+
# Download and install node.js
18+
RUN Invoke-WebRequest $('https://nodejs.org/dist/v{0}/node-v{0}-win-x64.zip' -f $env:NODE_VERSION) -OutFile 'node.zip' -UseBasicParsing ; \
19+
# $sum = $(cat SHASUMS256.txt.asc | sls $(' node-v{0}-win-x64.zip' -f $env:NODE_VERSION)) -Split ' ' ; \
20+
# if ((Get-FileHash node.zip -Algorithm sha256).Hash -ne $sum[0]) { Write-Error 'SHA256 mismatch' } ; \
21+
Expand-Archive node.zip -DestinationPath C:\ ; \
22+
Rename-Item -Path $('C:\node-v{0}-win-x64' -f $env:NODE_VERSION) -NewName 'C:\nodejs'
23+
24+
# Download and install yarn
25+
RUN [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 ; \
26+
Invoke-WebRequest $('https://github.com/yarnpkg/yarn/releases/download/v{0}/yarn-{0}.msi' -f $env:YARN_VERSION) -OutFile yarn.msi -UseBasicParsing ; \
27+
Start-Process msiexec.exe -ArgumentList '/i', 'yarn.msi', '/quiet', '/norestart' -NoNewWindow -Wait
28+
29+
FROM download as install
30+
31+
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
32+
33+
ENV NPM_CONFIG_LOGLEVEL info
34+
35+
COPY --from=download /nodejs /nodejs
36+
COPY --from=download [ "/Program Files (x86)/yarn", "/yarn" ]
37+
38+
RUN $env:PATH = 'C:\nodejs;C:\yarn\bin;{0}' -f $env:PATH ; \
39+
[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
40+
41+
FROM install
42+
43+
WORKDIR C:/cf-container-logger
44+
45+
COPY package.json ./
46+
47+
COPY yarn.lock ./
48+
49+
RUN yarn install --frozen-lockfile --production
50+
51+
COPY . ./
52+
53+
LABEL owner="codefresh.io"
54+
55+
CMD ["powershell", "./lib/forever.ps1"]

codefresh.yml

-109
This file was deleted.

gulpfile.js

-107
This file was deleted.

0 commit comments

Comments
 (0)