Skip to content

Go's TLS cannot find root certs in 1.6.2-alpine #97

Closed
@jmhodges

Description

@jmhodges

When trying to port to golang:1.6.2-alpine from golang:1.6.2, the Go HTTP client gets errors like:

x509: failed to load system roots and no roots provided

when making HTTPS requests.

Minimum case:

In the Dockerfile:

FROM golang:1.6.2-alpine
CMD ["sh"]`

And then run go run foo.go with a foo.go of

package main

import (
    "fmt"
    "net/http"
)

func main() {
    _, err := http.Get("https://www.google.com")
    fmt.Printf("welp %s\n", err)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions