<h1 dir="auto">Feature request</h1>
<h2 dir="auto">Is your feature request related to a problem? Please describe.</h2>
<p dir="auto">My development setup consists of multiple Docker containers:</p>
<ol dir="auto">
<li>Next.js application running in development mode</li>
<li>Mock API</li>
<li>Proxy that is used in front of Next.js application and mock API containers so one host is used for accessing both the application and API.</li>
</ol>
<p dir="auto">Next.js 8.0 has introduced WebSockets based ping approach. This in turn uses randomly assigned port for WebSocket connection and makes it impossible for me to specify which port to open in proxy container to proxy to the application container. This results in refresh of the page every 5 seconds after WebSocket connection fails.</p>
<h2 dir="auto">Describe the solution you'd like</h2>
<p dir="auto">Possibility to configure WebSocket ping port will solve this issue since that specific port can be opened and proxied in the proxy container.</p>
<h2 dir="auto">Describe alternatives you've considered</h2>
<p dir="auto">Solution described above is desired and probably absolutely doable. As an alternative I would consider possibility to specify ping approach: either <code class="notranslate">fetch</code> based or WebSocket based.</p>
<h1 dir="auto">Bug report</h1>
<h2 dir="auto">Describe the bug</h2>
<p dir="auto">We can't use nextjs v8 in dev mode with docker because it reload the DOM every 5 seconds.<br>
He can't access to the websocket port. I can open this port in my Dockerfile but it change every time I launch next</p>
<h2 dir="auto">To Reproduce</h2>
<p dir="auto">Steps to reproduce the behavior, please provide code snippets or a repository:<br>
Just start next v8 with docker in dev mode</p>
<h2 dir="auto">Screenshots</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="on-demand-entries-client.js:136 WebSocket connection to 'ws://0.0.0.0:41861/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED"><pre class="notranslate"><code class="notranslate">on-demand-entries-client.js:136 WebSocket connection to 'ws://0.0.0.0:41861/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
</code></pre></div>
<h2 dir="auto">System information</h2>
<ul dir="auto">
<li>OS: macOS</li>
<li>Version of Next.js: 8.0.0</li>
</ul>