I'm trying to set up a Linux-based Docker container to run an Angular web app as described in this question (warning: long!). I've got to the point where I've established that the problem I'm having there stems from the fact that the attempt to install NPM as part of the Docker container setup failed.
When I bash
into the container, and run the command that's meant to do this:
wget -O- https://deb.nodesource.com/setup_6.x
... I get an error:
ERROR: The certificate of 'deb.nodesource.com' is not trusted.
ERROR: The certificate of 'deb.nodesource.com' hasn't got a known issuer.
I'd love to be able to sort that issue the right way, but for now I'm just adding --no-check-certificate
to the command, which bypasses that issue.
Now I have another error when I pipe that setup script into bash
:
Your distribution, identified as "stretch", is not currently supported, 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
Following the link in that message, I see a bunch of issues, only some of which are related. However, a bit of extra googling brought me to the FAQ, which in turn pointed me at issue #9, which... has lots of people chipping in with different solutions, and references to other issues. :-(
The main suggestion seems to be to use sudo -E
as follows:
wget -qO- https://deb.nodesource.com/setup_6.x | sudo -E bash -
... but I don't have sudo
. :-(
UPDATE: I think first issue with wget
and the second issue have the same root cause. The Node setup script does a curl
to some URL to test whether I'm on a supported version, and this is also failing due to HTTPS certificate issues.
If I do this:
curl -L https://deb.nodesource.com/setup
...then I get this error:
SSL certificate problem: self signed certificate in certificate chain
...which I can fix if I add the --insecure
flag. But I think I need to fix the certificate issue before the Node setup script will work.
Any ideas how I can do that? (Maybe that should be a different question?).