Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failed with gatekeeper installtion #2445

Open
tppalani opened this issue Jul 21, 2024 · 0 comments
Open

Docker build failed with gatekeeper installtion #2445

tppalani opened this issue Jul 21, 2024 · 0 comments

Comments

@tppalani
Copy link

Output of the info page

 => CACHED [linux/amd64 2/4] COPY ca.crt /usr/local/share/ca-certificates/extra                                                            0.0s
 => CACHED [linux/amd64 3/4] RUN  update-ca-certificates                                                                                   0.0s
 => ERROR [linux/amd64 4/4] RUN agent integration install -r -t datadog-gatekeeper==1.0.0                                                  3.2s
------
 > [linux/amd64 4/4] RUN agent integration install -r -t datadog-gatekeeper==1.0.0:
3.053 Traceback (most recent call last):
3.053   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/connectionpool.py", line 715, in urlopen
3.053     httplib_response = self._make_request(
3.053   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/connectionpool.py", line 404, in _make_request
3.054     self._validate_conn(conn)
3.054   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1058, in _validate_conn
3.054     conn.connect()
3.054   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/connection.py", line 419, in connect
3.054     self.sock = ssl_wrap_socket(
3.054   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 449, in ssl_wrap_socket
3.055     ssl_sock = _ssl_wrap_socket_impl(
3.055   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/util/ssl_.py", line 493, in _ssl_wrap_socket_impl
3.055     return ssl_context.wrap_socket(sock, server_hostname=server_hostname)
3.055   File "/opt/datadog-agent/embedded/lib/python3.9/ssl.py", line 501, in wrap_socket
3.055     return self.sslsocket_class._create(
3.055   File "/opt/datadog-agent/embedded/lib/python3.9/ssl.py", line 1074, in _create
3.056     self.do_handshake()
3.056   File "/opt/datadog-agent/embedded/lib/python3.9/ssl.py", line 1343, in do_handshake
3.057     self._sslobj.do_handshake()
3.057 ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)
3.057
3.057 During handling of the above exception, another exception occurred:
3.057
3.057 Traceback (most recent call last):
3.057   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/requests/adapters.py", line 486, in send
3.057     resp = conn.urlopen(
3.057   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/connectionpool.py", line 799, in urlopen
3.057     retries = retries.increment(
3.057   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/urllib3/util/retry.py", line 592, in increment
3.058     raise MaxRetryError(_pool, url, error or ResponseError(cause))
3.058 urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='dd-integrations-core-wheels-build-stable.datadoghq.com', port=443): Max retries exceeded with url: /metadata.staged/13.root.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)')))
3.058
3.058 During handling of the above exception, another exception occurred:
3.058
3.058 Traceback (most recent call last):
3.058   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/fetcher.py", line 71, in fetch
3.058     return self._fetch(url)
3.058   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/_internal/requests_fetcher.py", line 77, in _fetch
3.058     response = session.get(
3.058   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/requests/sessions.py", line 602, in get
3.058     return self.request("GET", url, **kwargs)
3.058   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/requests/sessions.py", line 589, in request
3.059     resp = self.send(prep, **send_kwargs)
3.059   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/requests/sessions.py", line 703, in send
3.059     r = adapter.send(request, **kwargs)
3.059   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/requests/adapters.py", line 517, in send
3.060     raise SSLError(e, request=request)
3.060 requests.exceptions.SSLError: HTTPSConnectionPool(host='dd-integrations-core-wheels-build-stable.datadoghq.com', port=443): Max retries exceeded with url: /metadata.staged/13.root.json (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self-signed certificate in certificate chain (_ssl.c:1129)')))
3.060
3.060 The above exception was the direct cause of the following exception:
3.060
3.060 Traceback (most recent call last):
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/runpy.py", line 197, in _run_module_as_main
3.060     return _run_code(code, main_globals, None,
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/runpy.py", line 87, in _run_code
3.060     exec(code, run_globals)
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/datadog_checks/downloader/__main__.py", line 9, in <module>
3.060     sys.exit(download())
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/datadog_checks/downloader/cli.py", line 146, in download
3.060     tuf_downloader, standard_distribution_name, version, ignore_python_version = instantiate_downloader()
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/datadog_checks/downloader/cli.py", line 124, in instantiate_downloader
3.060     tuf_downloader = TUFDownloader(
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/datadog_checks/downloader/download.py", line 115, in __init__
3.060     self.__updater.refresh()
3.060   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/updater.py", line 126, in refresh
3.061     self._load_root()
3.061   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/updater.py", line 312, in _load_root
3.061     data = self._download_metadata(
3.061   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/updater.py", line 269, in _download_metadata
3.061     return self._fetcher.download_bytes(url, length)
3.061   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/fetcher.py", line 141, in download_bytes
3.061     with self.download_file(url, max_length) as dl_file:
3.061   File "/opt/datadog-agent/embedded/lib/python3.9/contextlib.py", line 119, in __enter__
3.062     return next(self.gen)
3.062   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/fetcher.py", line 103, in download_file
3.062     chunks = self.fetch(url)
3.062   File "/opt/datadog-agent/embedded/lib/python3.9/site-packages/tuf/ngclient/fetcher.py", line 75, in fetch
3.062     raise exceptions.DownloadError(f"Failed to download {url}") from e
3.062 tuf.api.exceptions.DownloadError: Failed to download https://dd-integrations-core-wheels-build-stable.datadoghq.com/metadata.staged/13.root.json
3.118 Error: error when downloading the wheel for datadog-gatekeeper 1.0.0: error running command: exit status 1
------
Dockerfile:12
--------------------
  10 |     ENV CURL_CA_BUNDLE=/usr/local/share/ca-certificates
  11 |
  12 | >>> RUN agent integration install -r -t datadog-gatekeeper==1.0.0
  13 |
--------------------
ERROR: failed to solve: process "/bin/sh -c agent integration install -r -t datadog-gatekeeper==1.0.0" did not complete successfully: exit code: 255

Additional environment details (Operating System, Cloud provider, etc):

Steps to reproduce the issue:

  1. Added my certificate into dockerfile as volume

Describe the results you received:
dockerfile not able to run RUN agent integration install -r -t datadog-gatekeeper==1.0.0 when i remove this command docker fie working without any issue

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant