Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with config file #87

Open
Adeljoo opened this issue Jan 30, 2020 · 3 comments
Open

Issue with config file #87

Adeljoo opened this issue Jan 30, 2020 · 3 comments

Comments

@Adeljoo
Copy link

Adeljoo commented Jan 30, 2020

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?

@RaboliotLeGris
Copy link

RaboliotLeGris commented Feb 12, 2020

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)

@spurgelaurels
Copy link

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.

@jojomi
Copy link
Owner

jojomi commented Mar 13, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants