Trouble installing NodeJS on Kali Linux docker image












-4















I am trying to create a docker image based on the Kali Linux base image, and I need to install NodeJS as a dependency for my application.



Here's my Dockerfile:



FROM kalilinux/kali-linux-docker

RUN apt-get update -y &&
apt-get dist-upgrade -y &&
apt-get autoremove -y &&
apt-get clean -y

RUN apt-get install curl -y

RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
&& apt-get install nodejs -y

RUN npm i -g npm

ENV NODE_ENV production

WORKDIR /root/app
COPY . .

RUN npm i

EXPOSE 4000
ENTRYPOINT ["npm", "start"]


However, I hit the following error trying to install NodeJS:



Step 4/11 : RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y
---> Running in a63e56802eba

## Installing the NodeSource Node.js 8.x LTS Carbon repo...


## Inspecting system...


## You don't appear to be running an Enterprise Linux based system,
please contact NodeSource at https://github.com/nodesource/distributions/issues
if you think this is incorrect or would like your distribution to be considered
for support.

The command '/bin/sh -c curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - && apt-get install nodejs -y' returned a non-zero code: 1


Admittedly I'm confused by a few things... namely that I was under the impression that NodeJS was already installed on Kali Linux (I have a VirtualBox VM using Debian 64-bit where it exists). I went as far as trying to install the kali-linux-all metapackage, but NodeJS/npm don't seem to exist.



Am I simply misunderstanding some basic premise of Docker and/or Kali Linux? Is there any other way to install NodeJS into my container?










share|improve this question



























    -4















    I am trying to create a docker image based on the Kali Linux base image, and I need to install NodeJS as a dependency for my application.



    Here's my Dockerfile:



    FROM kalilinux/kali-linux-docker

    RUN apt-get update -y &&
    apt-get dist-upgrade -y &&
    apt-get autoremove -y &&
    apt-get clean -y

    RUN apt-get install curl -y

    RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
    && apt-get install nodejs -y

    RUN npm i -g npm

    ENV NODE_ENV production

    WORKDIR /root/app
    COPY . .

    RUN npm i

    EXPOSE 4000
    ENTRYPOINT ["npm", "start"]


    However, I hit the following error trying to install NodeJS:



    Step 4/11 : RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y
    ---> Running in a63e56802eba

    ## Installing the NodeSource Node.js 8.x LTS Carbon repo...


    ## Inspecting system...


    ## You don't appear to be running an Enterprise Linux based system,
    please contact NodeSource at https://github.com/nodesource/distributions/issues
    if you think this is incorrect or would like your distribution to be considered
    for support.

    The command '/bin/sh -c curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - && apt-get install nodejs -y' returned a non-zero code: 1


    Admittedly I'm confused by a few things... namely that I was under the impression that NodeJS was already installed on Kali Linux (I have a VirtualBox VM using Debian 64-bit where it exists). I went as far as trying to install the kali-linux-all metapackage, but NodeJS/npm don't seem to exist.



    Am I simply misunderstanding some basic premise of Docker and/or Kali Linux? Is there any other way to install NodeJS into my container?










    share|improve this question

























      -4












      -4








      -4








      I am trying to create a docker image based on the Kali Linux base image, and I need to install NodeJS as a dependency for my application.



      Here's my Dockerfile:



      FROM kalilinux/kali-linux-docker

      RUN apt-get update -y &&
      apt-get dist-upgrade -y &&
      apt-get autoremove -y &&
      apt-get clean -y

      RUN apt-get install curl -y

      RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
      && apt-get install nodejs -y

      RUN npm i -g npm

      ENV NODE_ENV production

      WORKDIR /root/app
      COPY . .

      RUN npm i

      EXPOSE 4000
      ENTRYPOINT ["npm", "start"]


      However, I hit the following error trying to install NodeJS:



      Step 4/11 : RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y
      ---> Running in a63e56802eba

      ## Installing the NodeSource Node.js 8.x LTS Carbon repo...


      ## Inspecting system...


      ## You don't appear to be running an Enterprise Linux based system,
      please contact NodeSource at https://github.com/nodesource/distributions/issues
      if you think this is incorrect or would like your distribution to be considered
      for support.

      The command '/bin/sh -c curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - && apt-get install nodejs -y' returned a non-zero code: 1


      Admittedly I'm confused by a few things... namely that I was under the impression that NodeJS was already installed on Kali Linux (I have a VirtualBox VM using Debian 64-bit where it exists). I went as far as trying to install the kali-linux-all metapackage, but NodeJS/npm don't seem to exist.



      Am I simply misunderstanding some basic premise of Docker and/or Kali Linux? Is there any other way to install NodeJS into my container?










      share|improve this question














      I am trying to create a docker image based on the Kali Linux base image, and I need to install NodeJS as a dependency for my application.



      Here's my Dockerfile:



      FROM kalilinux/kali-linux-docker

      RUN apt-get update -y &&
      apt-get dist-upgrade -y &&
      apt-get autoremove -y &&
      apt-get clean -y

      RUN apt-get install curl -y

      RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -
      && apt-get install nodejs -y

      RUN npm i -g npm

      ENV NODE_ENV production

      WORKDIR /root/app
      COPY . .

      RUN npm i

      EXPOSE 4000
      ENTRYPOINT ["npm", "start"]


      However, I hit the following error trying to install NodeJS:



      Step 4/11 : RUN curl --silent --location https://rpm.nodesource.com/setup_8.x | bash -     && apt-get install nodejs -y
      ---> Running in a63e56802eba

      ## Installing the NodeSource Node.js 8.x LTS Carbon repo...


      ## Inspecting system...


      ## You don't appear to be running an Enterprise Linux based system,
      please contact NodeSource at https://github.com/nodesource/distributions/issues
      if you think this is incorrect or would like your distribution to be considered
      for support.

      The command '/bin/sh -c curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - && apt-get install nodejs -y' returned a non-zero code: 1


      Admittedly I'm confused by a few things... namely that I was under the impression that NodeJS was already installed on Kali Linux (I have a VirtualBox VM using Debian 64-bit where it exists). I went as far as trying to install the kali-linux-all metapackage, but NodeJS/npm don't seem to exist.



      Am I simply misunderstanding some basic premise of Docker and/or Kali Linux? Is there any other way to install NodeJS into my container?







      node.js docker npm kali-linux






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 13 '18 at 19:59









      arthurakayarthurakay

      4,33362653




      4,33362653
























          1 Answer
          1






          active

          oldest

          votes


















          0














          I still don't fully understand why NodeJS is installed on my VM but not the base Kali docker image... but in any case I did manage to unblock myself.



          First, I was pulling down a NodeJS installation script from nodesource which required rpm -- I found a different script that works without it. However the new script also required that I install gnupg.



          Here's my updated Dockerfile:



          FROM kalilinux/kali-linux-docker

          RUN apt-get update -y &&
          apt-get dist-upgrade -y &&
          apt-get autoremove -y &&
          apt-get clean -y

          RUN apt-get -y install curl gnupg

          RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
          && apt-get install nodejs -y

          RUN npm i -g npm

          ENV NODE_ENV production

          WORKDIR /root/app
          COPY . .

          RUN npm i

          EXPOSE 4000
          ENTRYPOINT ["npm", "start"]





          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            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%2fstackoverflow.com%2fquestions%2f53288609%2ftrouble-installing-nodejs-on-kali-linux-docker-image%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            1 Answer
            1






            active

            oldest

            votes








            1 Answer
            1






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            0














            I still don't fully understand why NodeJS is installed on my VM but not the base Kali docker image... but in any case I did manage to unblock myself.



            First, I was pulling down a NodeJS installation script from nodesource which required rpm -- I found a different script that works without it. However the new script also required that I install gnupg.



            Here's my updated Dockerfile:



            FROM kalilinux/kali-linux-docker

            RUN apt-get update -y &&
            apt-get dist-upgrade -y &&
            apt-get autoremove -y &&
            apt-get clean -y

            RUN apt-get -y install curl gnupg

            RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
            && apt-get install nodejs -y

            RUN npm i -g npm

            ENV NODE_ENV production

            WORKDIR /root/app
            COPY . .

            RUN npm i

            EXPOSE 4000
            ENTRYPOINT ["npm", "start"]





            share|improve this answer




























              0














              I still don't fully understand why NodeJS is installed on my VM but not the base Kali docker image... but in any case I did manage to unblock myself.



              First, I was pulling down a NodeJS installation script from nodesource which required rpm -- I found a different script that works without it. However the new script also required that I install gnupg.



              Here's my updated Dockerfile:



              FROM kalilinux/kali-linux-docker

              RUN apt-get update -y &&
              apt-get dist-upgrade -y &&
              apt-get autoremove -y &&
              apt-get clean -y

              RUN apt-get -y install curl gnupg

              RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
              && apt-get install nodejs -y

              RUN npm i -g npm

              ENV NODE_ENV production

              WORKDIR /root/app
              COPY . .

              RUN npm i

              EXPOSE 4000
              ENTRYPOINT ["npm", "start"]





              share|improve this answer


























                0












                0








                0







                I still don't fully understand why NodeJS is installed on my VM but not the base Kali docker image... but in any case I did manage to unblock myself.



                First, I was pulling down a NodeJS installation script from nodesource which required rpm -- I found a different script that works without it. However the new script also required that I install gnupg.



                Here's my updated Dockerfile:



                FROM kalilinux/kali-linux-docker

                RUN apt-get update -y &&
                apt-get dist-upgrade -y &&
                apt-get autoremove -y &&
                apt-get clean -y

                RUN apt-get -y install curl gnupg

                RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
                && apt-get install nodejs -y

                RUN npm i -g npm

                ENV NODE_ENV production

                WORKDIR /root/app
                COPY . .

                RUN npm i

                EXPOSE 4000
                ENTRYPOINT ["npm", "start"]





                share|improve this answer













                I still don't fully understand why NodeJS is installed on my VM but not the base Kali docker image... but in any case I did manage to unblock myself.



                First, I was pulling down a NodeJS installation script from nodesource which required rpm -- I found a different script that works without it. However the new script also required that I install gnupg.



                Here's my updated Dockerfile:



                FROM kalilinux/kali-linux-docker

                RUN apt-get update -y &&
                apt-get dist-upgrade -y &&
                apt-get autoremove -y &&
                apt-get clean -y

                RUN apt-get -y install curl gnupg

                RUN curl --silent --location https://deb.nodesource.com/setup_8.x | bash -
                && apt-get install nodejs -y

                RUN npm i -g npm

                ENV NODE_ENV production

                WORKDIR /root/app
                COPY . .

                RUN npm i

                EXPOSE 4000
                ENTRYPOINT ["npm", "start"]






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 13 '18 at 20:44









                arthurakayarthurakay

                4,33362653




                4,33362653






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • 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%2fstackoverflow.com%2fquestions%2f53288609%2ftrouble-installing-nodejs-on-kali-linux-docker-image%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

                    Xamarin.iOS Cant Deploy on Iphone

                    Glorious Revolution

                    Dulmage-Mendelsohn matrix decomposition in Python