use "update-ca-certificates" in gitlab/gitlab-ce:latest doesn't work (SSL certificate problem: unable to get local issuer certificate)

Summary

in gitlab/gitlab-ce:latest fail.

FROM gitlab/gitlab-ce:latest
ADD ./rootCA.pem /usr/local/share/ca-certificates/rootCA.crt
RUN update-ca-certificates
RUN curl https://auth.xxxxx.com
EXPOSE 80 443

docker build --add-host auth.xxxxx.com:192.168.22.201  -t rrttest -f DOCKERFILE.GITLAB .


Updating certificates in /etc/ssl/certs...
1 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
Removing intermediate container 428aef995133
 ---> 0204d133f3c8
Step 4/5 : RUN curl https://auth.xxxxx.com
 ---> Running in 4300382ccd10
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
curl: (60) SSL certificate problem: unable to get local issuer certificate
More details here: https://curl.haxx.se/docs/sslcerts.html

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

FROM gitlab/gitlab-ce:latest

in centos:latest success!

FROM centos:latest
RUN mkdir -p /etc/pki/ca-trust/source/anchors/
ADD ./rootCA.pem /etc/pki/ca-trust/source/anchors/rootCA.cer
RUN update-ca-trust
RUN curl https://auth.xxxxx.com

docker build --add-host auth.xxxxx.com:192.168.22.201  -t rrtcentos -f DOCKERFILE.CENTOS .

Step 3/5 : ADD ./rootCA.pem /etc/pki/ca-trust/source/anchors/rootCA.cer
 ---> Using cache
 ---> b97a7fdb0602
Step 4/5 : RUN update-ca-trust
 ---> Using cache
 ---> 74c217d0aa93
Step 5/5 : RUN curl https://auth.xxxxx.com
 ---> Running in 325b65c50b17
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   173  100   173    0     0     34      0  0:00:05  0:00:05 --:--:--    45
`502 Bad Gateway`
`

502 Bad Gateway

` `
nginx/1.14.1` ``
Edited by Cy