[build]: install node.js for non-amd64 sonic-slave docker

instruct azure pipeline to use node.js in the docker.

https://docs.microsoft.com/en-us/azure/devops/pipelines/process/container-phases?view=azure-devops#bring-your-own-nodejs

Signed-off-by: Guohan Lu <lguohan@gmail.com>
This commit is contained in:
Guohan Lu 2020-12-28 19:43:53 -08:00
parent 23f1d51de3
commit 0b0da87766
2 changed files with 18 additions and 1 deletions

View File

@ -480,3 +480,11 @@ RUN pip2 install m2crypto==0.36.0
# Install swi tools
RUN pip2 install git+https://github.com/aristanetworks/swi-tools.git@d51761ec0bb93c73039233f3c01ed48235ffad00
{% if CONFIGURED_ARCH != "amd64" -%}
# Install node.js for azure pipeline
RUN apt-get install -y node.js
# Tell azure pipeline to use node.js in the docker
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"
{% endif -%}

View File

@ -451,3 +451,12 @@ RUN pip install m2crypto==0.36.0
# Install swi tools
RUN pip2 install git+https://github.com/aristanetworks/swi-tools.git@d51761ec0bb93c73039233f3c01ed48235ffad00
{% if CONFIGURED_ARCH != "amd64" -%}
# Install node.js for azure pipeline
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash -
RUN apt-get install -y nodejs
# Tell azure pipeline to use node.js in the docker
LABEL "com.azure.dev.pipelines.agent.handler.node.path"="/usr/bin/node"
{% endif -%}