dev-server inside docker?
See original GitHub issueHi,
I’m trying to get encore dev-server
to work inside a docker container.
I noticed at first that it listens only on the container’s loopback interface (‘localhost’), which was OK, because I could use --host 0.0.0.0
to get it to listen on the proper network interface…
But when I do this the manifest.json ends up using http://0.0.0.0:8080/....
as it’s url prefix, and this stops the assets from loading.
I tried the --public ...
flag to set a hostname for the public URL, but that doesn’t seem to affect manifest generation.
How can I do this?
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:4
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Running WebpackDevServer in Docker - DEV Community
Sometimes we want to run webpack-dev-server in a Docker container. The reason might be like following. Want to use a specific Node.js version ......
Read more >Configure Webpack to work inside a container - Okteto
How to adjust your Webpack configuration to work inside a Docker container. ... the container webpack-dev-server must be configured to use 0.0.0.0 as...
Read more >Cannot run webpack-dev-server inside docker - Stack Overflow
I just want to add something to Raphayol answer if you couldn't enable hot-reloading of webpack-dev-server inside container.
Read more >Configuring webpack dev server watch inside docker ...
When running webpack dev server from inside of docker container dev server says that it watching files, but don't react on changes in...
Read more >Connection reset with webpack-dev-server inside Docker
All of that was fine though, the issue is with how webpack is being configured, specifically the host property inside of the devServer...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
My project is based on a Docker and my container listen to the port 8088. Symfony webpack-dev-server works by default on the port 8080. In the docker-compose file, i just had to open the 8080 port in both sides :
And my Yarn script is now (according to this comment) :
"dev-server": "encore dev-server --host 0.0.0.0 --disable-host-check"
It just works now ! 🎉
Hey @davidmpaz, actually it’s an issue with how encore bundles a few webpack configuration items into one setting, which in a docker (or any remote dev style environment) you would hit an issue with.
To recap the problem:
Encore doesn’t provide a way of altering the config manually for the manifest plugin. If I was using standard webpack config I would easily be able to override that.