'Error relocating /usr/bin/node: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found

I'm trying to create Dockerfile based on openjdk:8-alpine with nodejs 12.22.6-r0

After installing nodejs I'm getting this error.

Dockerfile attached below.

Thanks in advance.

~ # node
Error relocating /usr/bin/node: _ZNSt7__cxx1119basic_ostringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
Error relocating /usr/bin/node: _ZNSt19_Sp_make_shared_tag5_S_eqERKSt9type_info: symbol not found
Error relocating /usr/bin/node: _ZNSt7__cxx1118basic_stringstreamIcSt11char_traitsIcESaIcEEC1Ev: symbol not found
FROM openjdk:8-alpine

## install general tools
RUN apk update --no-cache && \
    apk add --no-cache \
    ca-certificates \
    openssh-client \
    libaio \
    net-tools \
    iputils \
    perl \
    bash \
    sed \
    zsh \
    vim \
    git \
    make \
    curl \
    wget \
    unzip \
    jq \
    procps \
    ttf-dejavu \ 
    python \
    ;


RUN apk add --no-cache \
    --repository http://dl-cdn.alpinelinux.org/alpine/v3.11/main/ \
    nodejs=12.22.6-r0 \
    npm=12.22.6-r0 \
    ;


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source