Hello,
I’m trying to use an insecure registry with torizoncore-builder bundle command. I have tried serving HTTP on a specified port, but I get the following error:
$ torizoncore-builder bundle --host-workdir $(pwd)
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://127.0.0.1:22376/v1.40/images/create?tag=latest&fromImage=10.0.0.100%3A80%2Fmy-image&platform=linux%2Farm%2Fv7
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 173, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/bundle.py", line 22, in bundle_containers
dockerbundle.download_containers_by_compose_file(
File "/builder/dockerbundle.py", line 285, in download_containers_by_compose_file
image = dind_client.images.pull(image, platform=platform)
File "/usr/local/lib/python3.9/dist-packages/docker/models/images.py", line 446, in pull
pull_log = self.client.api.pull(
File "/usr/local/lib/python3.9/dist-packages/docker/api/image.py", line 430, in pull
self._raise_for_status(response)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/local/lib/python3.9/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error for https://127.0.0.1:22376/v1.40/images/create?tag=latest&fromImage=10.0.0.100%3A80%2Fmy-image&platform=linux%2Farm%2Fv7: Internal Server Error ("Get https://10.0.0.100:80/v2/: http: server gave HTTP response to HTTPS client")
And if I try to serve the registry through HTTPS with self signed certificates:
$ torizoncore-builder bundle --host-workdir $(pwd)
An unexpected Exception occured. Please provide the following stack trace to
the Toradex TorizonCore support team:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 268, in _raise_for_status
response.raise_for_status()
File "/usr/local/lib/python3.9/dist-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: https://127.0.0.1:22376/v1.40/images/create?tag=latest&fromImage=10.0.0.100%2Fmy-image&platform=linux%2Farm%2Fv7
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/builder/torizoncore-builder", line 173, in <module>
mainargs.func(mainargs)
File "/builder/tcbuilder/cli/bundle.py", line 22, in bundle_containers
dockerbundle.download_containers_by_compose_file(
File "/builder/dockerbundle.py", line 285, in download_containers_by_compose_file
image = dind_client.images.pull(image, platform=platform)
File "/usr/local/lib/python3.9/dist-packages/docker/models/images.py", line 446, in pull
pull_log = self.client.api.pull(
File "/usr/local/lib/python3.9/dist-packages/docker/api/image.py", line 430, in pull
self._raise_for_status(response)
File "/usr/local/lib/python3.9/dist-packages/docker/api/client.py", line 270, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/local/lib/python3.9/dist-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 500 Server Error for https://127.0.0.1:22376/v1.40/images/create?tag=latest&fromImage=10.0.0.100%2Fmy-image&platform=linux%2Farm%2Fv7: Internal Server Error ("Get https://10.0.0.100/v2/: x509: certificate signed by unknown authority")
Unfortunately it is extremely difficult for me to get a valid https cert on my network.
I’m able to work with this registry locally by adding it to “insecure-registries” in daemon.json docker config. Is there any way to do this with torizoncore-builder?