-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Document usage of the ghcr.io/gohugoio/hugo Docker image #2727
Comments
@jmooring I did a quick test with the new container and it worked for me (run from the parent directory containing the source and dest directories): docker run --rm -v $(pwd):/site ghcr.io/gohugoio/hugo:v0.135.0 --source /site/pages --destination /site/public Without seeing errors or logs I'm not sure, but it could be the directory you ran from or the user ( Update: seeing your note on permissions, I'm surprised you would need it, but you may on some platforms. All the platforms I use are Windows (Docker Desktop, Rancher Desktop), which run in the current user context, or a Linux container in CI where it's running as the default If some other examples would help, this is the Hugo container I've maintained and run for years, and the README has some usage examples (build, run as server, run interactive). It probably needs to be cleaned up, but some of the |
I have been testing by building a site from within its project directory, where the public and resource directories do not yet exist.
Without it, everything's owned by root:
From the project directory I should be able to build the site like this:
But the container has a default flag of
Or, as @aarongoldenthal suggests below:
The server command is:
We also need to describe what you can't do (write WebP, transpile Sass, use Hugo modules, etc.). |
I see. This is on a Mac? I guess I finally get my +1 for Windows 😉 , there everything inherits the logged on user permissions. |
hugo v0.135.0 linux/amd64 BuildDate=unknown VendorInfo=mage |
I'll need to think about that... seems like the instructions may need to have a platform-specific component. On Windows the volume is through WSL to the container, and specifying the user either fails with the user not existing (with the actual user), or a permission issue running in the container (picking a random user). The docker run --rm -v $(pwd):/site --entrypoint="" ghcr.io/gohugoio/hugo:v0.135.0 hugo |
Some notes from me (running on MacOS) testing the latest (0.136.0 for now): Build
Start server
The one potentially problematic thing to explain to the end user is the |
Some notes here:
gohugoio/hugo#12885
The text was updated successfully, but these errors were encountered: