Open stealthybox opened 7 years ago
We definitely had this problem a while ago. I don't know what caused it, because somebody (@xetorthio or @marcosnils) did something that fixed it magically; and I don't know what something was.
Ideas to investigate:
tcpdump
on the host to see what kind of packets go around when trying a git clone git://...
iptables -nxvL
before and after trying the git clone
(and look which counters are incremented; it might give a hint about some iptables rule filtering the traffic)iptables -nxvL -t nat
hey @jpetazzo the magic
thing you're talking about was when trying to close repos with the git:// url which was just adding a .gitconfig file in the PWD instance (https://github.com/play-with-docker/play-with-docker/blob/master/.gitconfig).
I have no clue why this specific package hangs the complete installation. Don't have much time in my hands lately, but I'll try to investigate whenever I can.
Yes. Just tried and a workaround would be to add to your ~/.gitconfig
the following:
[url "https://"]
insteadOf = git://
@xetorthio but we're already shipping that .gitconfig file in PWD dind
containers...
@marcosnils you'd need to mount the .gitconfig
into any containers you run in the dind if you want to pull git:// repos from inside of them, though
@marcosnils you'd need to mount the .gitconfig into any containers you run in the dind if you want to pull git:// repos from inside of them, though
doh!. Yeah, I remember adding that .gitconfig in PWD for some other connection issues. Don't really understand why standard git:// doesn't work though.
Use case
I have a Dockerfile that I was using for some WebVR development. I was going to demo it on my phone by using Play-With-Docker.
Initial Symptoms
docker build
my image: -->npm install
hangs while installing aframe dependencies from npm and github.@xetorthio, @drmdrew, and I chatted about this in the community slack.
Reproducing
I have reduced the scope to just installing aframe. The following command:
runs properly on:
It fails to run on:
# hangs afterAdd tween.js
looking at ps, there are active two active processes for git clone related to npm:
Cloning Git Repos on PWD
I made a discovery. You can clone the repos fine from the host using the git protocol:
However, you cannot from inside an
alpine
oralpine:node
container:... but it works using https:
ubuntu
hangs after this strange message:121 suggests that this is not intentional.
Perhaps there some sort of container specific IPTables / firewalls preventing this? ( Maybe allowing only HTTP/S? ) If so we should document and/or fix it because it hangs silently.
As always, thanks for pushing to make pwd better for the community.
Cheers, Leigh 🐳