How to install latest node inside a docker container












13















How do I install the latest node inside a docker ubuntu 15.10 container?
apt-get install nodejs installs version 0.1 and no npm



Thanks










share|improve this question

























  • Did you solve it? For me it installs npm v 3.10, can't get 6+

    – simPod
    Dec 23 '16 at 10:55
















13















How do I install the latest node inside a docker ubuntu 15.10 container?
apt-get install nodejs installs version 0.1 and no npm



Thanks










share|improve this question

























  • Did you solve it? For me it installs npm v 3.10, can't get 6+

    – simPod
    Dec 23 '16 at 10:55














13












13








13


3






How do I install the latest node inside a docker ubuntu 15.10 container?
apt-get install nodejs installs version 0.1 and no npm



Thanks










share|improve this question
















How do I install the latest node inside a docker ubuntu 15.10 container?
apt-get install nodejs installs version 0.1 and no npm



Thanks







apt server docker nodejs






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Oct 5 '18 at 4:41









saber tabatabaee yazdi

1033




1033










asked Jan 13 '16 at 21:02









TomaszTomasz

378128




378128













  • Did you solve it? For me it installs npm v 3.10, can't get 6+

    – simPod
    Dec 23 '16 at 10:55



















  • Did you solve it? For me it installs npm v 3.10, can't get 6+

    – simPod
    Dec 23 '16 at 10:55

















Did you solve it? For me it installs npm v 3.10, can't get 6+

– simPod
Dec 23 '16 at 10:55





Did you solve it? For me it installs npm v 3.10, can't get 6+

– simPod
Dec 23 '16 at 10:55










5 Answers
5






active

oldest

votes


















21














OK got it,



update apt-get update

install curl apt-get install curl

get install script and pass it to execute: curl -sL https://deb.nodesource.com/setup_4.x | bash

and install node apt-get install nodejs

confirm that it was successful node -v
npm installs automatically npm -v



use curl -sL https://deb.nodesource.com/setup_5.x | bash for node 5.x






share|improve this answer



















  • 6





    I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

    – Alex White
    Jun 21 '17 at 21:22











  • I have the same problem.

    – And Finally
    Sep 4 '17 at 12:23











  • What if I want to have the exact version as 8.9.4? The above command fails.

    – Sourav Prem
    Apr 13 '18 at 12:41






  • 1





    See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

    – Nathaniel Ford
    Apr 26 '18 at 23:08



















6














This is how I have been installing nodeJS into a container. In my case, I am using an nginx base image.



Use the following command



    apt-get update -yq 
&& apt-get install curl gnupg -yq
&& curl -sL https://deb.nodesource.com/setup_8.x | bash
&& apt-get install nodejs -yq


GNUPG is needed by the nodeJS installer. Without it, you will get the following error message;



[91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation





share|improve this answer

































    5














    You can add a single line to your Dockerfile.



    FROM node:8.2


    There is a list of supported tag names here: https://hub.docker.com/_/node/






    share|improve this answer



















    • 19





      This answer doesn't help anyone using a different base image.

      – Charles Offenbacher
      Jan 13 '18 at 18:45











    • Then they can use Tomasz's answer

      – posit labs
      Jan 13 '18 at 22:54



















    0














    installing nodejs v8 with ubuntu 16.04 base image:



    FROM ubuntu:16.04

    WORKDIR /app

    RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
    RUN echo "LANG=en_US.UTF-8" >> /etc/environment
    RUN echo "NODE_ENV=development" >> /etc/environment
    RUN more "/etc/environment"
    #RUN locale-gen en_US en_US.UTF-8
    #RUN dpkg-reconfigure locales

    RUN apt-get update
    RUN apt-get upgrade -y
    RUN apt-get dist-upgrade -y
    RUN apt-get install curl htop git zip nano ncdu build-essential chrpath libssl-dev libxft-dev pkg-config glib2.0-dev libexpat1-dev gobject-introspection python-gi-dev apt-transport-https libgirepository1.0-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev fail2ban nginx -y

    # Install Node.js
    RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
    RUN apt-get install --yes nodejs
    RUN node -v
    RUN npm -v
    RUN npm i -g nodemon
    RUN nodemon -v

    # Cleanup
    RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y


    I also installed some extra dependencies I need so you can clean up this code for your needs. But it installs nodejs & npm & nodemon.






    share|improve this answer































      0














      Updated solution as of Jan 2019:



      FROM ubuntu:latest
      USER root
      WORKDIR /home/app
      COPY ./package.json /home/app/package.json
      RUN apt-get update
      RUN apt-get -y install curl gnupg
      RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
      RUN apt-get -y install nodejs
      RUN npm install





      share|improve this answer








      New contributor




      Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















        Your Answer








        StackExchange.ready(function() {
        var channelOptions = {
        tags: "".split(" "),
        id: "89"
        };
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function() {
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled) {
        StackExchange.using("snippets", function() {
        createEditor();
        });
        }
        else {
        createEditor();
        }
        });

        function createEditor() {
        StackExchange.prepareEditor({
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader: {
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        },
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        });


        }
        });














        draft saved

        draft discarded


















        StackExchange.ready(
        function () {
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f720784%2fhow-to-install-latest-node-inside-a-docker-container%23new-answer', 'question_page');
        }
        );

        Post as a guest















        Required, but never shown

























        5 Answers
        5






        active

        oldest

        votes








        5 Answers
        5






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        21














        OK got it,



        update apt-get update

        install curl apt-get install curl

        get install script and pass it to execute: curl -sL https://deb.nodesource.com/setup_4.x | bash

        and install node apt-get install nodejs

        confirm that it was successful node -v
        npm installs automatically npm -v



        use curl -sL https://deb.nodesource.com/setup_5.x | bash for node 5.x






        share|improve this answer



















        • 6





          I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

          – Alex White
          Jun 21 '17 at 21:22











        • I have the same problem.

          – And Finally
          Sep 4 '17 at 12:23











        • What if I want to have the exact version as 8.9.4? The above command fails.

          – Sourav Prem
          Apr 13 '18 at 12:41






        • 1





          See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

          – Nathaniel Ford
          Apr 26 '18 at 23:08
















        21














        OK got it,



        update apt-get update

        install curl apt-get install curl

        get install script and pass it to execute: curl -sL https://deb.nodesource.com/setup_4.x | bash

        and install node apt-get install nodejs

        confirm that it was successful node -v
        npm installs automatically npm -v



        use curl -sL https://deb.nodesource.com/setup_5.x | bash for node 5.x






        share|improve this answer



















        • 6





          I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

          – Alex White
          Jun 21 '17 at 21:22











        • I have the same problem.

          – And Finally
          Sep 4 '17 at 12:23











        • What if I want to have the exact version as 8.9.4? The above command fails.

          – Sourav Prem
          Apr 13 '18 at 12:41






        • 1





          See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

          – Nathaniel Ford
          Apr 26 '18 at 23:08














        21












        21








        21







        OK got it,



        update apt-get update

        install curl apt-get install curl

        get install script and pass it to execute: curl -sL https://deb.nodesource.com/setup_4.x | bash

        and install node apt-get install nodejs

        confirm that it was successful node -v
        npm installs automatically npm -v



        use curl -sL https://deb.nodesource.com/setup_5.x | bash for node 5.x






        share|improve this answer













        OK got it,



        update apt-get update

        install curl apt-get install curl

        get install script and pass it to execute: curl -sL https://deb.nodesource.com/setup_4.x | bash

        and install node apt-get install nodejs

        confirm that it was successful node -v
        npm installs automatically npm -v



        use curl -sL https://deb.nodesource.com/setup_5.x | bash for node 5.x







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Jan 13 '16 at 22:54









        TomaszTomasz

        378128




        378128








        • 6





          I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

          – Alex White
          Jun 21 '17 at 21:22











        • I have the same problem.

          – And Finally
          Sep 4 '17 at 12:23











        • What if I want to have the exact version as 8.9.4? The above command fails.

          – Sourav Prem
          Apr 13 '18 at 12:41






        • 1





          See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

          – Nathaniel Ford
          Apr 26 '18 at 23:08














        • 6





          I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

          – Alex White
          Jun 21 '17 at 21:22











        • I have the same problem.

          – And Finally
          Sep 4 '17 at 12:23











        • What if I want to have the exact version as 8.9.4? The above command fails.

          – Sourav Prem
          Apr 13 '18 at 12:41






        • 1





          See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

          – Nathaniel Ford
          Apr 26 '18 at 23:08








        6




        6





        I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

        – Alex White
        Jun 21 '17 at 21:22





        I have seen these same instructions all over the web but I cannot get it to install npm. After running the apt-get -y install nodejs, running an npm command does not work. I get /bin/sh: 1: npm: not found

        – Alex White
        Jun 21 '17 at 21:22













        I have the same problem.

        – And Finally
        Sep 4 '17 at 12:23





        I have the same problem.

        – And Finally
        Sep 4 '17 at 12:23













        What if I want to have the exact version as 8.9.4? The above command fails.

        – Sourav Prem
        Apr 13 '18 at 12:41





        What if I want to have the exact version as 8.9.4? The above command fails.

        – Sourav Prem
        Apr 13 '18 at 12:41




        1




        1





        See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

        – Nathaniel Ford
        Apr 26 '18 at 23:08





        See this. In the README section it explains how to get different version. Also, 4 is being end-of-lifed, so don't use the above command exactly.

        – Nathaniel Ford
        Apr 26 '18 at 23:08













        6














        This is how I have been installing nodeJS into a container. In my case, I am using an nginx base image.



        Use the following command



            apt-get update -yq 
        && apt-get install curl gnupg -yq
        && curl -sL https://deb.nodesource.com/setup_8.x | bash
        && apt-get install nodejs -yq


        GNUPG is needed by the nodeJS installer. Without it, you will get the following error message;



        [91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation





        share|improve this answer






























          6














          This is how I have been installing nodeJS into a container. In my case, I am using an nginx base image.



          Use the following command



              apt-get update -yq 
          && apt-get install curl gnupg -yq
          && curl -sL https://deb.nodesource.com/setup_8.x | bash
          && apt-get install nodejs -yq


          GNUPG is needed by the nodeJS installer. Without it, you will get the following error message;



          [91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation





          share|improve this answer




























            6












            6








            6







            This is how I have been installing nodeJS into a container. In my case, I am using an nginx base image.



            Use the following command



                apt-get update -yq 
            && apt-get install curl gnupg -yq
            && curl -sL https://deb.nodesource.com/setup_8.x | bash
            && apt-get install nodejs -yq


            GNUPG is needed by the nodeJS installer. Without it, you will get the following error message;



            [91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation





            share|improve this answer















            This is how I have been installing nodeJS into a container. In my case, I am using an nginx base image.



            Use the following command



                apt-get update -yq 
            && apt-get install curl gnupg -yq
            && curl -sL https://deb.nodesource.com/setup_8.x | bash
            && apt-get install nodejs -yq


            GNUPG is needed by the nodeJS installer. Without it, you will get the following error message;



            [91mE: gnupg, gnupg2 and gnupg1 do not seem to be installed, but one of them is required for this operation






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jun 26 '18 at 22:59









            abu_bua

            3,30681127




            3,30681127










            answered Jun 26 '18 at 20:08









            SageSage

            16112




            16112























                5














                You can add a single line to your Dockerfile.



                FROM node:8.2


                There is a list of supported tag names here: https://hub.docker.com/_/node/






                share|improve this answer



















                • 19





                  This answer doesn't help anyone using a different base image.

                  – Charles Offenbacher
                  Jan 13 '18 at 18:45











                • Then they can use Tomasz's answer

                  – posit labs
                  Jan 13 '18 at 22:54
















                5














                You can add a single line to your Dockerfile.



                FROM node:8.2


                There is a list of supported tag names here: https://hub.docker.com/_/node/






                share|improve this answer



















                • 19





                  This answer doesn't help anyone using a different base image.

                  – Charles Offenbacher
                  Jan 13 '18 at 18:45











                • Then they can use Tomasz's answer

                  – posit labs
                  Jan 13 '18 at 22:54














                5












                5








                5







                You can add a single line to your Dockerfile.



                FROM node:8.2


                There is a list of supported tag names here: https://hub.docker.com/_/node/






                share|improve this answer













                You can add a single line to your Dockerfile.



                FROM node:8.2


                There is a list of supported tag names here: https://hub.docker.com/_/node/







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Aug 3 '17 at 7:01









                posit labsposit labs

                15113




                15113








                • 19





                  This answer doesn't help anyone using a different base image.

                  – Charles Offenbacher
                  Jan 13 '18 at 18:45











                • Then they can use Tomasz's answer

                  – posit labs
                  Jan 13 '18 at 22:54














                • 19





                  This answer doesn't help anyone using a different base image.

                  – Charles Offenbacher
                  Jan 13 '18 at 18:45











                • Then they can use Tomasz's answer

                  – posit labs
                  Jan 13 '18 at 22:54








                19




                19





                This answer doesn't help anyone using a different base image.

                – Charles Offenbacher
                Jan 13 '18 at 18:45





                This answer doesn't help anyone using a different base image.

                – Charles Offenbacher
                Jan 13 '18 at 18:45













                Then they can use Tomasz's answer

                – posit labs
                Jan 13 '18 at 22:54





                Then they can use Tomasz's answer

                – posit labs
                Jan 13 '18 at 22:54











                0














                installing nodejs v8 with ubuntu 16.04 base image:



                FROM ubuntu:16.04

                WORKDIR /app

                RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
                RUN echo "LANG=en_US.UTF-8" >> /etc/environment
                RUN echo "NODE_ENV=development" >> /etc/environment
                RUN more "/etc/environment"
                #RUN locale-gen en_US en_US.UTF-8
                #RUN dpkg-reconfigure locales

                RUN apt-get update
                RUN apt-get upgrade -y
                RUN apt-get dist-upgrade -y
                RUN apt-get install curl htop git zip nano ncdu build-essential chrpath libssl-dev libxft-dev pkg-config glib2.0-dev libexpat1-dev gobject-introspection python-gi-dev apt-transport-https libgirepository1.0-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev fail2ban nginx -y

                # Install Node.js
                RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
                RUN apt-get install --yes nodejs
                RUN node -v
                RUN npm -v
                RUN npm i -g nodemon
                RUN nodemon -v

                # Cleanup
                RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y


                I also installed some extra dependencies I need so you can clean up this code for your needs. But it installs nodejs & npm & nodemon.






                share|improve this answer




























                  0














                  installing nodejs v8 with ubuntu 16.04 base image:



                  FROM ubuntu:16.04

                  WORKDIR /app

                  RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
                  RUN echo "LANG=en_US.UTF-8" >> /etc/environment
                  RUN echo "NODE_ENV=development" >> /etc/environment
                  RUN more "/etc/environment"
                  #RUN locale-gen en_US en_US.UTF-8
                  #RUN dpkg-reconfigure locales

                  RUN apt-get update
                  RUN apt-get upgrade -y
                  RUN apt-get dist-upgrade -y
                  RUN apt-get install curl htop git zip nano ncdu build-essential chrpath libssl-dev libxft-dev pkg-config glib2.0-dev libexpat1-dev gobject-introspection python-gi-dev apt-transport-https libgirepository1.0-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev fail2ban nginx -y

                  # Install Node.js
                  RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
                  RUN apt-get install --yes nodejs
                  RUN node -v
                  RUN npm -v
                  RUN npm i -g nodemon
                  RUN nodemon -v

                  # Cleanup
                  RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y


                  I also installed some extra dependencies I need so you can clean up this code for your needs. But it installs nodejs & npm & nodemon.






                  share|improve this answer


























                    0












                    0








                    0







                    installing nodejs v8 with ubuntu 16.04 base image:



                    FROM ubuntu:16.04

                    WORKDIR /app

                    RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
                    RUN echo "LANG=en_US.UTF-8" >> /etc/environment
                    RUN echo "NODE_ENV=development" >> /etc/environment
                    RUN more "/etc/environment"
                    #RUN locale-gen en_US en_US.UTF-8
                    #RUN dpkg-reconfigure locales

                    RUN apt-get update
                    RUN apt-get upgrade -y
                    RUN apt-get dist-upgrade -y
                    RUN apt-get install curl htop git zip nano ncdu build-essential chrpath libssl-dev libxft-dev pkg-config glib2.0-dev libexpat1-dev gobject-introspection python-gi-dev apt-transport-https libgirepository1.0-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev fail2ban nginx -y

                    # Install Node.js
                    RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
                    RUN apt-get install --yes nodejs
                    RUN node -v
                    RUN npm -v
                    RUN npm i -g nodemon
                    RUN nodemon -v

                    # Cleanup
                    RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y


                    I also installed some extra dependencies I need so you can clean up this code for your needs. But it installs nodejs & npm & nodemon.






                    share|improve this answer













                    installing nodejs v8 with ubuntu 16.04 base image:



                    FROM ubuntu:16.04

                    WORKDIR /app

                    RUN echo "LC_ALL=en_US.UTF-8" >> /etc/environment
                    RUN echo "LANG=en_US.UTF-8" >> /etc/environment
                    RUN echo "NODE_ENV=development" >> /etc/environment
                    RUN more "/etc/environment"
                    #RUN locale-gen en_US en_US.UTF-8
                    #RUN dpkg-reconfigure locales

                    RUN apt-get update
                    RUN apt-get upgrade -y
                    RUN apt-get dist-upgrade -y
                    RUN apt-get install curl htop git zip nano ncdu build-essential chrpath libssl-dev libxft-dev pkg-config glib2.0-dev libexpat1-dev gobject-introspection python-gi-dev apt-transport-https libgirepository1.0-dev libtiff5-dev libjpeg-turbo8-dev libgsf-1-dev fail2ban nginx -y

                    # Install Node.js
                    RUN curl -sL https://deb.nodesource.com/setup_8.x | bash
                    RUN apt-get install --yes nodejs
                    RUN node -v
                    RUN npm -v
                    RUN npm i -g nodemon
                    RUN nodemon -v

                    # Cleanup
                    RUN apt-get update && apt-get upgrade -y && apt-get autoremove -y


                    I also installed some extra dependencies I need so you can clean up this code for your needs. But it installs nodejs & npm & nodemon.







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Aug 11 '18 at 20:02









                    LukasLukas

                    1347




                    1347























                        0














                        Updated solution as of Jan 2019:



                        FROM ubuntu:latest
                        USER root
                        WORKDIR /home/app
                        COPY ./package.json /home/app/package.json
                        RUN apt-get update
                        RUN apt-get -y install curl gnupg
                        RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
                        RUN apt-get -y install nodejs
                        RUN npm install





                        share|improve this answer








                        New contributor




                        Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                        Check out our Code of Conduct.

























                          0














                          Updated solution as of Jan 2019:



                          FROM ubuntu:latest
                          USER root
                          WORKDIR /home/app
                          COPY ./package.json /home/app/package.json
                          RUN apt-get update
                          RUN apt-get -y install curl gnupg
                          RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
                          RUN apt-get -y install nodejs
                          RUN npm install





                          share|improve this answer








                          New contributor




                          Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                          Check out our Code of Conduct.























                            0












                            0








                            0







                            Updated solution as of Jan 2019:



                            FROM ubuntu:latest
                            USER root
                            WORKDIR /home/app
                            COPY ./package.json /home/app/package.json
                            RUN apt-get update
                            RUN apt-get -y install curl gnupg
                            RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
                            RUN apt-get -y install nodejs
                            RUN npm install





                            share|improve this answer








                            New contributor




                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.










                            Updated solution as of Jan 2019:



                            FROM ubuntu:latest
                            USER root
                            WORKDIR /home/app
                            COPY ./package.json /home/app/package.json
                            RUN apt-get update
                            RUN apt-get -y install curl gnupg
                            RUN curl -sL https://deb.nodesource.com/setup_11.x | bash -
                            RUN apt-get -y install nodejs
                            RUN npm install






                            share|improve this answer








                            New contributor




                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            share|improve this answer



                            share|improve this answer






                            New contributor




                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.









                            answered 2 days ago









                            DanDan

                            101




                            101




                            New contributor




                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.





                            New contributor





                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






                            Dan is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
                            Check out our Code of Conduct.






























                                draft saved

                                draft discarded




















































                                Thanks for contributing an answer to Ask Ubuntu!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid



                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.


                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function () {
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f720784%2fhow-to-install-latest-node-inside-a-docker-container%23new-answer', 'question_page');
                                }
                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                迪纳利

                                How did Captain America manage to do this?

                                南乌拉尔铁路局