
证书问题
docker run调试某个container报如下所示x509证书错误,一开始怀疑是容器网络(--network host) 的问题 : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 [deoops@dev-3 ~]# docker run --network host datewu/controller:v0.0.2 {"level":"panic","error":"Get https://google.com: x509: certificate signed by unknown authority","time":1555498448,"message":"get max item failed"} panic: get max item failed goroutine 26 [running]: github.com/rs/zerolog.(*Logger).Panic.func1(0x7773e9, 0x13) /Users/deoops/go/pkg/mod/github.com/rs/[email protected]/log.go:307 +0x4f github.com/rs/zerolog.(*Event).msg(0xc00012e8a0, 0x7773e9, 0x13) /Users/deoops/go/pkg/mod/github.com/rs/[email protected]/event.go:141 +0x1c1 github.com/rs/zerolog.(*Event).Msg(...) /Users/deoops/go/pkg/mod/github.com/rs/[email protected]/event.go:105 main.catchUp() /Users/deoops/github/controller/work.go:69 +0x326 main.populate(0xc000114000) /Users/deoops/github/controller/worker.go:10 +0x26 created by main.initWork /Users/deoops/github/controller/work.go:84 +0x7f 错误信息大概是说 client 不能识别google的https 证书, 可能是base image alpine的问题。 ...