Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fallback from Node 20 to Node 16 on container startup #4987

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DenisRumyantsev
Copy link
Contributor

@DenisRumyantsev DenisRumyantsev commented Sep 11, 2024

Description: an improvement for the previous PR. Fallback from Node 20 to Node 16 is added in the current PR.

Updated Docker command —

  • On Windows —
docker create --name <name> --label <label> --network <network>
-v "<agent>\_work":"C:\__w"
-v "<agent>\_work\_tasks":"C:\__w\_tasks"
-v "<agent>\_work\_tool":"C:\__t"
-v "<agent>\externals":"C:\__a\externals"
mcr.microsoft.com/windows/servercore:ltsc2022
cmd.exe /c call
"C:\__a\externals\node20_1\bin\node.exe" --version
&& echo "container-startup-using-node-20"
&& "C:\__a\externals\node20_1\bin\node.exe" -e "setInterval(function(){}, 24 * 60 * 60 * 1000);"
|| "C:\__a\externals\node16\bin\node.exe" --version
&& echo "container-startup-using-node-16"
&& "C:\__a\externals\node16\bin\node.exe" -e "setInterval(function(){}, 24 * 60 * 60 * 1000);"
|| echo "container-startup-failed"
  • On Linux —
/usr/bin/docker create --name <name> --label <label> --network <network>
-v "/var/run/docker.sock":"/var/run/docker.sock"
-v "<agent>/_work/1":"/__w/1"
-v "<agent>/_work/_temp":"/__w/_temp"
-v "<agent>/_work/_tasks":"/__w/_tasks"
-v "<agent>/_work/_tool":"/__t"
-v "<agent>/externals":"/__a/externals":ro
-v "<agent>/_work/.taskkey":"/__w/.taskkey"
ubuntu:latest
bash -c "
'/__a/externals/node20_1/bin/node' --version
&& echo 'container-startup-using-node-20'
&& '/__a/externals/node20_1/bin/node' -e 'setInterval(function(){}, 24 * 60 * 60 * 1000);'
|| '/__a/externals/node16/bin/node' --version
&& echo 'container-startup-using-node-16'
&& '/__a/externals/node16/bin/node' -e 'setInterval(function(){}, 24 * 60 * 60 * 1000);'
|| echo 'container-startup-failed'
"

@DenisRumyantsev DenisRumyantsev added the misc Miscellaneous Changes label Sep 11, 2024
@DenisRumyantsev DenisRumyantsev marked this pull request as ready for review September 12, 2024 09:05
@DenisRumyantsev DenisRumyantsev force-pushed the users/DenisRumyantsev/container-fallback-from-node20-to-node16 branch 9 times, most recently from 2c3cdd9 to 2a554d8 Compare September 19, 2024 15:25
@DenisRumyantsev DenisRumyantsev force-pushed the users/DenisRumyantsev/container-fallback-from-node20-to-node16 branch from 2a554d8 to 7b4c92e Compare September 19, 2024 16:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
misc Miscellaneous Changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant