-
-
Notifications
You must be signed in to change notification settings - Fork 7.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
Hugo docker cannot find Go binary in PATH #12915
Comments
I can see same behavior when building my site which uses Hugo modules. https://gitlab.com/emacs-apac/emacs-apac.gitlab.io/
I was going through the Dockerfile and saw that we don't install Go in the final stage so this error is expected. Lines 29 to 45 in 0398458
I'm assuming Hugo modules are commonly used now a days, so should we include Go installation in the final stage? Installing Go in alpine imageI tried this with following Dockerfile: FROM ghcr.io/gohugoio/hugo:v0.135.0
RUN apk add --no-cache go Impact is the image size, it is increased by ~300MB
Use same image as the build stage?Other option is to use the same base image we use for the build stage which seems to be smaller than installing Go via apk. But I haven't tried doing that, so don't know what will be size of the final image. |
Fixed in #12921 .... |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
What version of Hugo are you using (
hugo version
)?Does this issue reproduce with the latest release?
Yes
When using hugo to load the modules from my go.mod file, my CI on GitLab complains that the image hasn't "go" in it's PATH.
See log
log.txt
The text was updated successfully, but these errors were encountered: