Search code examples
dockergoogle-cloud-storagenio

x509: certificate signed by unknown authority: Google Storage in Docker


Running a tool that was hitting Google Storage from within Docker, I kept getting the following error: "x509: certificate signed by unknown authority".

I reviewed several articles that suggested installing ca-certificates would solve this problem for me, but doing so within my docker build had no effect.

How can I access Google Storage from within Docker?


Solution

  • In my particular case, the issue came about because I was using a default ubuntu:18.04 Docker image without the Google Cloud SDK installed.

    When I instead switched to a Docker image that had the Google Cloud SDK preinstalled, such as gcr.io/cloud-genomics-pipelines/io, or if I installed the tools within the Ubuntu instance, this issue was resolved.