Closed babatundebusari closed 5 years ago
This project makes Hugo as Docker image and is not a replacement of Hugo. Please see the Hugo documentation for information on how to use Hugo.
Just because it is dockerized hugo does not mean you can not have a proper documentation of how to use the image. Just trying to help you maintain a helpful repo but you can do whatever you want; it is your repo!. Peace.
@babatundebusari Any ideas for when you start up Hugo within docker, after run "hugo new site" automatically? Thanks
Am also interested in getting this one right :)
I just worked my way through this issue. The Docker image has hugo installed, but it doesn't have any code for a website. That's why we get the error about missing a config file. This page helped me work out that bit. If you do have code for a website, make sure your $(pwd)
is the directory containing your site's code.
If you don't have code for a website on your local machine, you can start the container with the shell command like so (if your them uses mods, choose a ext-<os>-onbuild
image):
docker run --rm -it \
-v $(pwd):/src \
klakegg/hugo:0.93.2-alpine \
shell
Then, from the container's shell, you can clone your website's GitHub repo (git is installed), or if you're starting from scratch, do a Quick Start and build your site.
You can start the server when you're done hugo server -D
. The -D
shows you draft posts.
After running this command
docker run --rm -it -v $(pwd):/src -v $(pwd)/output:/target klakegg/hugo:0.46
got below error
i am not sure if the /src folder mounted from host need files there already i am just looking to get started with hugo with docker and not sure if there are needed files or pre-requisites before running the docker commands in the README file
Will be great if you can add some more info in readme for people getting started with hugo with docker