installation of nodejs returned a non-zero code: 1 with docker build
19,829
Have you tried running this yourself to see what the error is? Like so:
$ docker run --rm -it ubuntu:16.10
[...]
root@96117efa0948:/# apt-get update
[...]
root@96117efa0948:/# apt-get install -y curl
[...]
root@96117efa0948:/# curl -sL https://deb.nodesource.com/setup_6.x | bash -
[...]
## Your distribution, identified as "Ubuntu Yakkety Yak (development
branch)", is a pre-release version of Ubuntu. NodeSource does not maintain
official support for Ubuntu versions until they are formally released. You
can try using the manual installation instructions available at
https://github.com/nodesource/distributions and use the latest supported
Ubuntu version name as the distribution identifier, although this is not
guaranteed to work.
root@96117efa0948:/#
So basically that blurb is telling you that your version of Ubunutu isn't supported yet. Try changing your config file to use ubuntu:16.04 - or work out some other way to install node.
Author by
Admin
Updated on June 05, 2022Comments
-
Admin almost 2 years
I'm trying to build a docker image with the following dockerfile:
FROM ubuntu:16.10 MAINTAINER Fátima Alves COPY ./dist /myprogram/ WORKDIR /myprogram RUN apt-get update \ && \ apt-get install -y \ curl \ && \ curl -sL https://deb.nodesource.com/setup_6.x | bash - \ && \ apt-get install -y \ python-dev \ libxml2-dev \ libxslt1-dev
And no matter what i do, this message is appearing in the terminal:
curl -sL https://deb.nodesource.com/setup_6.x | bash -' returned a non-zero code: 1
I'm not finding anything related in google.
Thanks!
-
Admin over 7 yearsOups... Question, what
-it
stands for? -
Matthew over 7 years
-i
is interactive,-t
is terminal - basically allows you to act as if you're on a terminal inside the image. See docs.docker.com/engine/reference/commandline/run