This post is about an issue that I am having using webpack and Vue.js and the stable version of Docker for Windows.
It seems that large compiled files ( more than 1 Mb ) are splitted into chunks when sent over from the Virtual Machine, and it turns out that 90% of the time they end up corrupted ( parts of other files seems to get injected in between files chunks ).
I came across a few reported bugs that are happening on both Windows and MacOS, it seems that these similar issues gets solved by changing Apache configuration to sendfile Off AND/OR MMAP Off
inside the Dockerfile :
RUN sed -i -e 's/EnableSendfile On\/EnableSendfile Off/g' /etc/apache2/httpd.conf
RUN sed -i -e 's/EnableMMAP On\/EnableMMAP Off/g' /etc/apache2/httpd.conf
This did not fix anything for me..
As you can see, without any code change, after each hard-refresh, these are the errors that come up, every time at a different line, because of corrupted file outputs:
Does anyone in the community have an idea on why this keeps on happening ?
In some docker configurations you just need to uncomment the line related to MMAP (SendFile is Off by default).
sed -i 's|#EnableMMAP off|EnableMMAP off|' /etc/apache2/httpd.conf \
Also you can look at you httpd.conf in your apache container to be sure weither you need to add/uncomment this MMAP option to Off
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With