File tree Expand file tree Collapse file tree 3 files changed +24
-24
lines changed Expand file tree Collapse file tree 3 files changed +24
-24
lines changed Original file line number Diff line number Diff line change @@ -52,17 +52,17 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2019 as runner
5252
5353SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
5454
55- RUN $newPath = ('C:\n odejs;{0}' -f $env:PATH); \
56- Write-Host ('Updating PATH: {0}' -f $newPath); \
57- [Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine)
58-
5955COPY --from=installer C:/nodejs C:/nodejs
60-
6156COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
62- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
6357
64- # Smoke test
65- RUN node --version; \
58+ RUN $newPath = ('C:\n odejs;{0}' -f $env:PATH); \
59+ Write-Host ('Updating PATH: {0}' -f $newPath); \
60+ [Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine); \
61+ # Because we need to use it in the current session
62+ $env:PATH = $newPath; \
63+ node --version; \
6664 npm --version;
6765
66+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
67+
6868CMD [ "node.exe" ]
Original file line number Diff line number Diff line change @@ -52,17 +52,17 @@ FROM mcr.microsoft.com/windows/servercore:ltsc2022 as runner
5252
5353SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
5454
55- RUN $newPath = ('C:\n odejs;{0}' -f $env:PATH); \
56- Write-Host ('Updating PATH: {0}' -f $newPath); \
57- [Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine)
58-
5955COPY --from=installer C:/nodejs C:/nodejs
60-
6156COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
62- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
6357
64- # Smoke test
65- RUN node --version; \
58+ RUN $newPath = ('C:\n odejs;{0}' -f $env:PATH); \
59+ Write-Host ('Updating PATH: {0}' -f $newPath); \
60+ [Environment]::SetEnvironmentVariable('PATH' , $newPath, [EnvironmentVariableTarget]::Machine); \
61+ # Because we need to use it in the current session
62+ $env:PATH = $newPath; \
63+ node --version; \
6664 npm --version;
6765
66+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
67+
6868CMD [ "node.exe" ]
Original file line number Diff line number Diff line change @@ -41,17 +41,17 @@ FROM mcr.microsoft.com/windows/servercore:version as runner
4141
4242SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
4343
44- RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
45- Write-Host ('Updating PATH: {0}' -f $newPath); \
46- [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine)
47-
4844COPY --from=installer C:/nodejs C:/nodejs
49-
5045COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
51- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
5246
53- # Smoke test
54- RUN node --version; \
47+ RUN $newPath = ('C:\nodejs;{0}' -f $env:PATH); \
48+ Write-Host ('Updating PATH: {0}' -f $newPath); \
49+ [Environment]::SetEnvironmentVariable('PATH', $newPath, [EnvironmentVariableTarget]::Machine); \
50+ # Because we need to use it in the current session
51+ $env:PATH = $newPath; \
52+ node --version; \
5553 npm --version;
5654
55+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
56+
5757CMD [ "node.exe" ]
You can’t perform that action at this time.
0 commit comments