If you have a custom CA and want your docker images to trust you certificates, you have to include the ca-certs in you images. This is different depending on the distribution of the base-image.
Debian Based
For Debian add these lines to your Dockerfile and provide the expected files.
FROM debian
ADD certs/my-cert.cer /usr/local/share/ca-certificates/my-cert.crt
RUN chmod 644 /usr/local/share/ca-certificates/*
RUN update-ca-certificates
...
It is important that your cert needs to have the filetype .crt
. Otherwise it will not be added.