gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.76k stars 7.53k forks source link

Remove Docker Hub hugo Dockerfile #6687

Closed jasikpark closed 4 years ago

jasikpark commented 4 years ago

What version of Hugo are you using (hugo version)?

$ hugo version
(HEAD 2019.12.30)
https://github.com/gohugoio/hugo/commit/aa4ccb8a1e9b8aa17397acf34049a2aa16b0b6cb

Does this issue reproduce with the latest release?

No, 0.62.0 does not produce this error.

When trying to build my site against the Docker image with Github Actions, I received the error {{(print $small.RelPermalink)}} appears in an ambiguous context within a URL, which is not a clear error at all -- if y'all disagree maybe you could point me towards where in the documentation I could add a note about it?

https://github.com/jasikpark/jasik-xyz/commit/2fbc361ff91c52c6f8af6e8d0b11768bf18f46c1/checks?check_suite_id=378124148

^^ here's the CI build run

https://github.com/jasikpark/jasik-xyz/blob/add-new-hugo-version-workflow/layouts/shortcodes/img.html

^^ here's the shortcode in question

This hasn't been a problem in any other version, so I would like to help try to figure out why that's an error.

jasikpark commented 4 years ago

So the error actually does not appear on aa4ccb but it does on the current Dockerfile version.

Screen Shot 2019-12-30 at 9 54 32 AM
jasikpark commented 4 years ago

Hmmm apparently this is an error that only shows up in the gohugio/hugo docker container?

I tried it with gohugoio/hugo:0.31 and I got similar errors.

calebjasik@Calebs-MacBook-Pro jasik-xyz % docker run -it -v /Users/calebjasik/Desktop/Github/jasik-xyz:/jasik-xyz -w /jasik-xyz -p 1313:1313 gohugoio/hugo:0.31 server --bind 0.0.0.0
Unable to find image 'gohugoio/hugo:0.31' locally
0.31: Pulling from gohugoio/hugo
d39321e59709: Pull complete 
Digest: sha256:567899ebd9a1d56c32426beac2ca36cd75b0f917a7a51450fefcdce3edbf1a1d
Status: Downloaded newer image for gohugoio/hugo:0.31
Started building sites ...
ERROR 2019/12/31 20:55:55 Unable to locate template for shortcode "twitter" in page "a-tweet.md"
ERROR 2019/12/31 20:55:55 Got error reading Git log: Git executable not found in $PATH
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/small-fig-tree/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/large-fig-update/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/fig-tree/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/hedgehog/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/hello/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "photos/first-plant-post/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "coco-mlem/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 error processing shortcode "shortcodes/img.html" for page "starbucks-at-zachry/index.md": html/template:shortcodes/img.html:38:38: {{.}} appears in an ambiguous context within a URL
ERROR 2019/12/31 20:55:55 Failed to get json resource https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0 with error message Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0: x509: failed to load system roots and no roots provided
ERROR 2019/12/31 20:55:55 error processing shortcode "_internal/shortcodes/instagram.html" for page "attempt-at-showing-an-instagram-post.md": template: _internal/shortcodes/instagram.html:1:238: executing "_internal/shortcodes/instagram.html" at <getJSON "https://api...>: error calling getJSON: Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BmvyRlcgX9U/&hidecaption=0: x509: failed to load system roots and no roots provided
ERROR 2019/12/31 20:55:55 Error while rendering "page": template: _default/single.html:29:14: executing "_default/single.html" at <.PrevPage>: can't evaluate field PrevPage in type *hugolib.PageOutput
ERROR 2019/12/31 20:55:55 Error while rendering "home": template: index.html:76:41: executing "index.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "section": template: _default/list.html:12:39: executing "_default/list.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "taxonomy": template: _default/list.html:12:39: executing "_default/list.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page
ERROR 2019/12/31 20:55:55 Error while rendering "404": template: 404.html:11:3: executing "404.html" at <partial "footer.html...>: error calling partial: template: partials/footer.html:12:48: executing "partials/footer.html" at <.Page.Title>: can't evaluate field Page in type *hugolib.Page

Built site for language en:
0 of 4 drafts rendered
0 future content
0 expired content
31 regular pages created
52 other pages created
8 non-page files copied
0 paginator pages created
18 tags created
2 categories created
total in 444 ms
Watching for changes in /jasik-xyz/{content,layouts,static}
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 0.0.0.0)
Press Ctrl+C to stop
jasikpark commented 4 years ago

Ah. I have discovered the problem. the docker image is using 0.32-DEV and does not build from HEAD as I assumed.

jasikpark commented 4 years ago

I see that this repo contains an up to date docker image -- could it possibly also be published on Docker Hub?

peaceiris commented 4 years ago

We (I) plan to use GitHub to publish docker images.

https://github.com/gohugoio/hugo/pull/6405#issuecomment-548280568

jasikpark commented 4 years ago

In that case, is there a way that the gohugoio/hugo Dockerfile could be removed from Docker Hub? It's misleading.

peaceiris commented 4 years ago

The user who created the gohugoio on Docker Hub can delete it. Who is he or she? We do not know...

jasikpark commented 4 years ago

https://github.com/ecma6/hugo

hmm that doesn't seem to be the author, just the source repo

bep commented 4 years ago

Hugo (this project) does not have a Docker file on Hub.

github-actions[bot] commented 2 years ago

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.