Hello there!
I have a problem with live-reload under Windows 10 and Docker. It doesn’t catch any changes on file system. I tried the following configuration under Ubuntu 18.04.1 LTS (on Hyper-V) and don’t have this problem so configuration looks good for me. Please give me any ideas how to fix it.
I use:
Windows 10 Version 1909
hugo v0.62.0
hugo-academic theme v4.6.3
Docker Desktop Community 2.1.0.5
I created Docker image with the following Dockerfile
FROM ubuntu:19.04
ENV HUGO_SERVER=localhost
ENV HUGO_VERSION 0.62.0
ENV HUGO_BINARY hugo_extended_${HUGO_VERSION}_Linux-64bit.deb
WORKDIR /web
RUN apt update
RUN apt -y install wget curl vim git net-tools
RUN curl -sL -o /tmp/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/${HUGO_BINARY}
RUN dpkg -i /tmp/hugo.deb
RUN rm /tmp/hugo.deb
RUN addgroup --gid 1024 mfrgroup
RUN adduser --disabled-password --gecos "" --force-badname --ingroup mfrgroup mfruser
USER mfruser
EXPOSE 1313
CMD echo 'started'
And started docker container with docker-compose file
version: '3.7'
services:
web:
image: local_hugo:0.62.0
container_name: web
command: hugo server --watch=true --bind 0.0.0.0
ports:
- 1313:1313
volumes:
- c:/Users/MyUser/mysite:/web
Everything is fine except hugo don’t catch changes on file system by live-reload. In Chrome ‘Network’ tool I can see that
- Request URL: ws://localhost:1313/livereload
- Request Method: GET
- Status Code: 101 Switching Protocols
Seems the same as in Ubuntu.
Any ideas?