nodejs / docker-node

Official Docker Image for Node.js :whale: :turtle: :rocket:
https://hub.docker.com/_/node/
MIT License
8.13k stars 1.95k forks source link

Unable to clone a repository with the node docker image #2097

Open AymarN opened 3 weeks ago

AymarN commented 3 weeks ago

Environment

Expected Behavior

I shall be able to clone a repository on Github through https or ssh on the node docker image

Current Behavior

While cloning a repository from Github https or ssh, on the node image, an error is showing on

ssh : The authenticity of host can't be established

https:// fatal: unable to access 'https://github.com/json-schema-org/website.git/': getaddrinfo() thread failed to start

Possible Solution

provide key details regarding the dockerfile to help build another image.

Steps to Reproduce

  1. Pull the docker image on Docker.com
  2. Run it
  3. clone a github repository through ssh or https
  4. In both cases, an error is showing on.

Additional Information

Thread failed to start

make_sure_right_access

LaurentGoderre commented 3 weeks ago

This might have to do with your network. I can't reproduce locally.

AymarN commented 3 weeks ago

Thank unto you for your answer. I am able to clone any repos on GitHub on my local computer. However , the errors that I have is on the node image. Give me enough time to keep on investigating.

AymarN commented 1 week ago

Good Morning, I think it is not a network issue. I cloned the repository on my local computer. There is no issue regarding cloning. The issue is regarding node limitation on my local computer. However on the node image which I pulled from docker I can't clone the repository through ssh.Whether I may have the docker file I could generate another image and try.

cloning on local and on Docker

LaurentGoderre commented 1 week ago

Docker 17 is very old. I would recommend updating that first to see if that helps

AymarN commented 1 week ago

Thank you for your answer. Do you have a link to a recent docker image that I may pull or an alternative ?

LaurentGoderre commented 1 week ago

It's not the image but the docker engine itself

AymarN commented 1 week ago

Thank you. I am using Docker version 26.1.4, build 5650f9b. Which version shall I use to get an appropriate version of node version ? Also, when the node image is pulled. Is NPM systematically set up ?

yosifkit commented 4 days ago

"thread failed to start" sounds like a libseccomp issue. Try running with --security-opt seccomp=unconfined and see if that makes the problems go away. If it does, then you'll need to make sure that docker, libseccomp and other dependent packages (like containerd and runc) are up to date, but it could be that your Linux distro (CentOS) doesn't have a new enough version of libseccomp.

See also https://github.com/docker-library/official-images/issues/16829.