karma phantomjs not capturing in docker container : <p>I'm having trouble getting phantomjs to capture karma in an alpine docker container. I'm using node 6.10.2. I've installed phantomjs alpine from <a href="https://github.com/Overbryd/docker-phantomjs-alpine/releases" rel="noreferrer">here</a>. I'm using the following versions:</p>

<pre><code>"karma": "^1.6.0",
"karma-coverage": "^1.1.1",
"karma-mocha": "^1.0.1",
"karma-mocha-reporter": "^2.0.0",
"karma-phantomjs-launcher": "^1.0.4",
"karma-webpack": "^2.0.3",
</code></pre>

<p>Inside my container when I run my tests I see the following output. (timestamps removed)</p>

<pre><code>INFO [karma]: Karma v1.6.0 server started at http://0.0.0.0:9876/
INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
INFO [launcher]: Starting browser PhantomJS
DEBUG [temp-dir]: Creating temp dir at /workspace/karma-1981971
DEBUG [launcher]: /usr/bin/phantomjs /workspace/karma-1981971/capture.js
WARN [launcher]: PhantomJS have not captured in 60000 ms, killing.
</code></pre>

<p>It then fails 2 times before exiting.</p>

<p>When I look at the contents of the tmp file <code>capture.js</code> it shows it is trying to open <code>localhost:9876/?id=18274999</code> and inside my container I try to <code>wget http://0.0.0.0:9876/</code> which does indeed succeed.</p>

<p>So I am very confused why PhantomJs fails to capture when I can indeed connect from within my container.</p>

<p>How should I go about debugging this? Any suggestions are greatly appreciated</p>
