Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Docker container failing to verify InfluxDB certificate #129
As of being a scratch container without any root certificates embedded it's not possible to verify the TLS certificate of the InfluxDB URL when using HTTPs.
A workaround for this issue is to mount the host certificates into the container while IMHO a proper solution would be to ship distro-certificates inside the container.
# Generic (Debian/Ubuntu/Gentoo/Alpine/...) docker run \ ... \ -v /etc/ssl:/etc/ssl:ro \ ... \ golift/unifi-poller:stable # Archlinux docker run \ ... \ -v /etc/ssl:/etc/ssl:ro \ -v /etc/ca-certificates:/etc/ca-certificates:ro \ ... \ golift/unifi-poller:stable
As an example how to fix this directly you could add another build step:
FROM [...] [...] FROM alpine:latest AS certs FROM scratch [...] COPY --from=certs /etc/ssl /etc/ssl [...]