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

Current Dockerfile produces incomplete image #5970

Closed
brianredbeard opened this issue May 18, 2019 · 0 comments

Comments

@brianredbeard
Copy link
Contributor

commented May 18, 2019

The current Dockerfile can't be used to build the existing docs due to the lack of any CA certificates (due to the FROM scratch changes in 8531ec7):

$ docker run -t -v /tmp/hugo/docs:/site ad1eac37fc362fc7cfc335f9309500d5bddd6295 version
Hugo Static Site Generator v0.56.0-DEV linux/amd64 BuildDate: unknown
$ docker run -t -v /tmp/hugo/docs:/site ad1eac37fc362fc7cfc335f9309500d5bddd6295 serve
Building sites … ERROR 2019/05/18 05:29:52 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=962380712027590657&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=962380712027590657&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:52 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=898398437527363585&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=898398437527363585&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:52 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1": Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:52 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=971755920639307777&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=971755920639307777&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:52 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1": Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=898398437527363585&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=898398437527363585&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=962380712027590657&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=962380712027590657&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=971755920639307777&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=971755920639307777&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1": Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1": Get https://api.instagram.com/oembed/?url=https://instagram.com/p/BWNjjyYFxVx/&hidecaption=1: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false: x509: certificate signed by unknown authority
ERROR 2019/05/18 05:29:53 Failed to get JSON resource "https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false": Get https://api.twitter.com/1/statuses/oembed.json?id=877500564405444608&dnt=false: x509: certificate signed by unknown authority
Total in 1762 ms
Error: Error building site: logged 14 error(s)

Relates to #5056

brianredbeard added a commit to brianredbeard/hugo that referenced this issue May 18, 2019

dockerfile: Switch base image for final build
Switching the base image for the final build to alpine as it still
provides a minimal interface, but has a mechanism for easily including
relevant CA certificates.  This is currently pinned to a tagged version,
though since none of the underlying mechanisms are used this should
balance both remaining stable, supported for a period of time, and
providing usable functionality.

Resolves gohugoio#5970
Affects gohugoio#5056

@bep bep added the Bug label May 18, 2019

@bep bep added this to the v0.56 milestone May 18, 2019

anthonyfok added a commit that referenced this issue May 23, 2019

dockerfile: Switch base image for final build
Switching the base image for the final build to alpine as it still
provides a minimal interface, but has a mechanism for easily including
relevant CA certificates.  This is currently pinned to a tagged version,
though since none of the underlying mechanisms are used this should
balance both remaining stable, supported for a period of time, and
providing usable functionality.

Resolves #5970
Affects #5056
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.