An MCVE to illustrate my own encounter with klakegg/docker-hugo#61
.
(Thanks, klakegg
, for your Hugo image, and for helping me to resolve this issue. 😊)
- Run
docker compose up -d
to spin up a Docker container. - Open
http://localhost:1313
. - Observe the content of
src/content/posts/my-test-post.md
. - Change the content of
src/content/posts/my-test-post.md
from the host machine. - Observe that the page doesn't auto-reload with the new content, and that a manual refresh also fails to update the content.
Note that changing the content from within the container also fails to trigger a reload. Also, changing command: server
to command: server --watch
in compose.yaml
doesn't help, nor does adding any of the other flags suggested in the issue comments.
Apart from initializing a Git repository and writing compose.yaml
and this README
, I followed the quick start guide:
hugo new site src
cd src
git submodule add https://github.com/theNewDynamic/gohugo-theme-ananke.git themes/ananke
echo theme = \"ananke\" >> config.toml
(I did this from within a Kali Linux instance running under WSL 2, because PowerShell'secho
wrote additional binary content toconfig.toml
.)hugo new posts/my-test-post.md
I then appended the following to src/content/posts/my-test-post.md
:
Hello, world!
<!-- 'Til next time, world! -->
Finally, I set draft: false
in the above post's front matter.
> hugo version
hugo v0.101.0-466fa43c16709b4483689930a4f9ac8add5c9f66+extended windows/amd64 BuildDate=2022-06-16T07:09:16Z VendorInfo=gohugoio
> docker version
Client:
Cloud integration: v1.0.24
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:09:02 2022
OS/Arch: windows/amd64
Context: default
Experimental: true
Server: Docker Desktop 4.10.1 (82475)
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:23 2022
OS/Arch: linux/amd64
Experimental: true
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
- Package this whole MCVE in its own Docker container. This'll require using Docker wihin Docker, which is possible (though I've never tried it).