-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker support #143
Comments
+1 having the exact same issue, would appreciate an update Is essentially this issue: |
+1 |
1 similar comment
+1 |
+1 the same for me, I can't use it. |
+1 |
4 similar comments
+1 |
+1 |
+1 |
+1 |
Use this project: https://github.com/brikis98/docker-osx-dev It picks up file changes events |
|
I am having the same problem, but I feel it's for a different reason. I'm using the |
+1 |
1 similar comment
+1 |
@natemara about your issue, I worked around that by setting the config: module.exports = {
entry: {
app: [
"webpack-dev-server/client?:8080/",
'webpack/hot/dev-server',
"./src/app.coffee"
]
}
} ...buuut, big disclaimer, it just fixed the socket.io address, not the livereload, which is still not working (webpack doesn't rebuild the files) |
+1 |
3 similar comments
+1 |
+1 |
+1 |
The problem has been sovled by Mark Wolfe, I have tested it in my MacBookPro. |
I fixed the problem with webpack config:
@FZX thanks! |
@sokra I believe it's not related to webpack-dev-server. It's just vboxfs that doesn't support fsevents or inotify. |
@geddski p.s.: here is a good post about dev env with docker on OS X. My solution is to just set |
+1 |
Seems like this should probably be closed since the problem is with Virtual Box's (likely reasonable) decision to not pass through inotify events. The current relatively common fix is to use https://github.com/brikis98/docker-osx-dev This is true for anyone using node, python, or any other language in docker who wants watchers. It really has little to do with Webpack. Perhaps it just needs to be documented, but there's little to do from a code standpoint. |
@jimthedev, apparently it's not even related to just Here is an excerpt from the PM2 documentation:
It seems that the best course of action is to make this information more prominent by putting it in the documentation where suitable, as you suggest. |
@langri-sha, the tricky part of documenting/educating on this is that polling has implications for large project structures. It isn't always the best option. In some scenarios it might be ideal, in others, a better option might be to use docker-osx-dev to marshall the diff'ing through alternative means while leaving your webpack config untouched. |
Thanks @fordlee404, setting watchOptions: {
poll: true
} |
I believe this is an issue with docker (caused by virtual box and other virtualization tools not supporting inotify events), not webpack-dev-server. There is a proposed solution here: moby/moby#18246 |
You are correct. This is an issue with Virtual Box. |
With new docker all works fine, My problem was in using |
I'm still having issues with webpack-dev-server in docker with docker-compose and nginx-proxy.
All I get is this from nginx-proxy when trying to visit app.dev in the browser;
webpack-dev-server doesn't seem to allow connection or something? An express server instead of the webpack-dev-server works fine. |
@enjikaka: you need to add |
@SpaceK33z Thanks, that made it work! |
Quick question for people using webpack in docker for development. Isn't it slow for non trivial apps with lots of files? After all it's running inside a VM. |
Yes, compared to running in your host environment, the typical setup will be slower, especially if you're using a hosted hypervisor. It's mostly impacting me on the first run and file transfers, but with proper caching these issues usually dissolve with the ease of running everything at once (development server, test runners, etc). |
@nickdima We use webpack inside Docker for deving at TIDAL. (Pretty huge app) I've only tried in on my Windows machine so fat though. Works great there. :) |
Not sure if this is related but I have been having a similar issue with running webpack and docker. I have found that increasing the number of file watchers in both os's have totally fixed my issues. For ubuntu by increasing the amount of inotify watchers https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers and for osx ive been running Again this may not help but may help but thought it was a good idea to post anyway. |
Anybody using RubyMine or a JetBrains IDE - please see @bartvanremortele's comment to fix this issue |
There was a bug on Windows machines (not OSX) where changes to source code weren't getting picked up by the hotloader, even though the hot loader was running. The fix was to enable polling in the hot loader server config (webpack/webpack-dev-server#143 (comment)) I also fixed the links to the static files in the html template to point to the /static/ nginx path I also refactored the two docker files into a folder, so they aren't just floating around at the project root
I also have the same problem using laravel-mix which runs webpack. |
For those interested (on Window), i'm currently working on a solution inspired by another.... |
@Angelinsky7 you're a genius! thanks a lot! |
@patroza :-) |
@SpaceK33z Was a Docker section added with the docs overhaul that I'm missing or not? |
…g Server Adding the full support for running the config inspector using Docker Compose. This incluedes setting up and running. * new file: .dockerignore - Never add those dirs to the image while building using Dockerfile * new file: Dockerfile - Reusable image for both the inspector and proxy servers * new file: docker-compose.yml - Declaring all the servers in that can be used - NOTE: Running in docker means the config server MUST be added to the UI as "http://config-server:8888", as the call goes through the Config Proxy. * modified: package.json - Adding more scripts to run the the proxy and app as in containers - Webpack in container see webpack/webpack-dev-server#143 (comment) * modified: README.md - Updating the README
In the remote server(centos7), I use command (npm run dev) to start webpack-dev-server, when I close the session, the "webpack-dev-server" is closing. How can i solve this probleam? |
currently when running webpack dev server inside of a docker container, the changes to the source files are not picked up by webpack, so no compilation happens.
Using boot2docker vm on OSX.
The text was updated successfully, but these errors were encountered: