Issue with config file
Adeljoo opened this issue · 3 comments
Hi,
I have tried to run this repository. First build the image by docker build -t test1/hugo:latest .
Second, run it by docker run -p 1313:1313 test1/hugo
But, I got the error that
Error: Unable to locate config file or config directory. Perhaps you need to create a new site.
Run hugo help new
for details.
Any tips to solve this issue?
Hi!
It's probably because you didn't mount any hugo volume so it as nothing to serve/read.
Try docker run -P HUGO_WATCH=1 -v $YOUR_HUGO_FOLDER:/src test1/hugo
(Based on the README)
Would it be fair to say that hugo should be installed locally first, a new hugo site created, and then this docker image is run on that directory for building/serving?
My hope is to find a docker container that simply ingests MD files into a hugo environment for building, without requiring hugo installed locally first.
This image is designed for building the page inside the container like you hope. I don't have time right now to debug your problem though, sorry about that!