Installing Node js on Dockerimage through Dockerfile

I am trying to install Node js through Dockerfile.But I am getting the following error.

But I am getting the below error.

The command '/bin/sh -c curl -sL https://deb.nodesource.com/setup_10.x | bash' returned a non-zero code: 1

My Dockerfile looks like:

FROM ubuntu:latest

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update --fix-missing && apt-get upgrade -y
RUN apt-get install -y -q --no-install-recommends 
        apt-transport-https 
        build-essential 
        ca-certificates 
        curl 
        git 
        libssl-dev 
        rsync 
        software-properties-common 
        devscripts 
        autoconf 
        ssl-cert 
        wget 
        r-base 
        r-base-dev 
        ca-certificates 
        libcurl4-openssl-dev

RUN curl -sL https://deb.nodesource.com/setup_10.x | bash
RUN apt-get install -y nodejs

Source: StackOverflow