-
Notifications
You must be signed in to change notification settings - Fork 516
add root certificates to Alpine images #99
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
Conversation
Fixes docker-library#96 (and the duplicate docker-library#97). This allows Go's HTTP library to make HTTPS client connections with secure certificate validation. Without this change, `net/http` in these images return the error `"x509: failed to load system roots and no roots provided"`. This adds 0.6MB to the image (as measured with docker history).
7576d33
to
029d980
Compare
@@ -5,9 +5,9 @@ ENV GOLANG_SRC_URL https://golang.org/dl/go$GOLANG_VERSION.src.tar.gz | |||
ENV GOLANG_SRC_SHA256 002acabce7ddc140d0d55891f9d4fcfbdd806b9332fb8b110c91bc91afb0bc93 | |||
|
|||
RUN set -ex \ | |||
&& apk add --no-cache ca-certificates \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should just make this a separate RUN
above the ENV
lines. We are already downloading the apk cache twice and this will let us share the layer between the go versions and might even work for other images from alpine:3.4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do!
Feedback handled! Let me know what you think. |
LGTM ping @tianon |
Indeed, LGTM, thanks! |
Thank you! |
- `docker`: ootb support for `--userns-remap=default` (docker-library/docker#13) - `elasticsearch`: 5.0.0-alpha4 - `golang`: Alpine `ca-certificates` (esp. for `net/http` usage; docker-library/golang#99) - `hello-seattle`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hello-world`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hola-mundo`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `kibana`: 5.0.0-alpha4 - `logstash`: 5.0.0-alpha4 - `mariadb`: 10.1.15 - `owncloud`: 9.0.3, 8.2.6 - `python`: remove double-`pip` (docker-library/python#121) - `rocket.chat`: 0.35.0
- `docker`: ootb support for `--userns-remap=default` (docker-library/docker#13) - `elasticsearch`: 5.0.0-alpha4 - `golang`: Alpine `ca-certificates` (esp. for `net/http` usage; docker-library/golang#99) - `hello-seattle`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hello-world`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hola-mundo`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `kibana`: 5.0.0-alpha4 - `logstash`: 5.0.0-alpha4 - `mariadb`: 10.1.15 - `owncloud`: 9.0.3, 8.2.6 - `python`: remove double-`pip` (docker-library/python#121) - `rocket.chat`: 0.35.0
- `docker`: ootb support for `--userns-remap=default` (docker-library/docker#13) - `elasticsearch`: 5.0.0-alpha4 - `golang`: Alpine `ca-certificates` (esp. for `net/http` usage; docker-library/golang#99) - `hello-seattle`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hello-world`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `hola-mundo`: use C for multi-architecture compatibility (docker-library/hello-world#17) - `kibana`: 5.0.0-alpha4 - `logstash`: 5.0.0-alpha4 - `mariadb`: 10.1.15 - `owncloud`: 9.0.3, 8.2.6 - `python`: remove double-`pip` (docker-library/python#121) - `rocket.chat`: 0.35.0
Fixes #96 (and the duplicate #97).
This allows Go's HTTP library to make HTTPS client connections with secure certificate validation. Without this change,
net/http
in these images return the error"x509: failed to load system roots and no roots provided"
.This adds 0.6MB to the image (as measured with docker history).