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
52
52
53
53
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
54
54
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
-
59
55
COPY --from=installer C:/nodejs C:/nodejs
60
-
61
56
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
62
- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
63
57
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; \
66
64
npm --version;
67
65
66
+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
67
+
68
68
CMD [ "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
52
52
53
53
SHELL ["powershell" , "-Command" , "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';" ]
54
54
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
-
59
55
COPY --from=installer C:/nodejs C:/nodejs
60
-
61
56
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
62
- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
63
57
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; \
66
64
npm --version;
67
65
66
+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
67
+
68
68
CMD [ "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
41
41
42
42
SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop'; $ProgressPreference = 'SilentlyContinue';"]
43
43
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
-
48
44
COPY --from=installer C:/nodejs C:/nodejs
49
-
50
45
COPY docker-entrypoint.ps1 C:/docker-entrypoint.ps1
51
- ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
52
46
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; \
55
53
npm --version;
56
54
55
+ ENTRYPOINT [ "powershell.exe" , "C:/docker-entrypoint.ps1" ]
56
+
57
57
CMD [ "node.exe" ]
You can’t perform that action at this time.
0 commit comments