In my case I had no ca-certificates
installed in Docker image due to https://github.com/debuerreotype/docker-debian-artifacts/issues/15.
Adding RUN apt update && apt install -y ca-certificates && rm -rf /var/lib/{apt,dpkg,cache,log}/
in Dockerfile and rebuilding container helped.