Problem installing TorizonCore Builder Tool on WSL

I’m attempting to install tcb for the first time on WSL2. The tcb-env-setup.sh script appears to be failing when trying to obtain the list of tcb tags from the docker hub registry. When I attempt to load the docker URL in a browser I get what seems like a valid response.

Output from tcb-env-setup.sh and the browser:

🐧 newUser @STERIS-US-x3Jes~/tcbdir: set -x
🐧 newUser @STERIS-US-x3Jes~/tcbdir: source tcb-env-setup.sh
+ source tcb-env-setup.sh
++ SOURCED=0
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '5.2.15(1)-release' ']'
++ return 0
++ SOURCED=1
++ '[' 1 = 0 ']'
++ tcb_env_setup_cleanup
++ unset source
++ unset under_windows
++ unset user_tag
++ unset storage
++ unset volumes
++ unset network
++ unset remote_tags
++ unset local_tags
++ unset tag
++ unset latest
++ unset latest_remote
++ unset latest_local
++ unset pull_remote
++ unset chosen_tag
++ unset -f tcb_env_setup_usage
++ unset -f get_latest_tag
++ unset -f tcb_env_setup_check_updated
++ under_windows=0
++ grep -i microsoft
++ uname -r
++ under_windows=1
++ volumes=' -v /deploy '
++ storage=storage
++ network=' --network=host '
++ '[' 1 = 1 ']'
++ network=' '
++ [[ 0 -gt 0 ]]
++ [[ '' != \l\o\c\a\l ]]
++ '[' -z '' ']'
++ SCRIPT_PATH=/home/newUser/tcbdir/tcb-env-setup.sh
++ tcb_env_setup_check_updated /home/newUser/tcbdir/tcb-env-setup.sh
++ '[' '!' -f /home/newUser/tcbdir/tcb-env-setup.sh ']'
++ local target_url=https://raw.githubusercontent.com/toradex/tcb-env-setup/master/tcb-env-setup.sh
+++ curl -sL -o tcb-env-setup.sh.tmp -w '%{http_code}' https://raw.githubusercontent.com/toradex/tcb-env-setup/master/tcb-env-setup.sh
++ local status_code=200
+++ md5sum tcb-env-setup.sh.tmp
+++ cut -d ' ' -f 1
++ local remote_md5sum=41376b733a614f0ab8ad379159ad7a8d
+++ md5sum /home/newUser/tcbdir/tcb-env-setup.sh
+++ cut -d ' ' -f 1
++ local local_md5sum=41376b733a614f0ab8ad379159ad7a8d
++ rm tcb-env-setup.sh.tmp
++ '[' 200 -eq 200 -a 41376b733a614f0ab8ad379159ad7a8d '!=' 41376b733a614f0ab8ad379159ad7a8d ']'
++ [[ '' = \e\m\p\t\y ]]
++ [[ '' = \e\m\p\t\y ]]
++ [[ storage = \e\m\p\t\y ]]
++ [[ -n '' ]]
++ [[ -n '' ]]
++ [[ storage != /* ]]
++ [[ ! storage =~ ^[a-zA-Z][a-zA-Z0-9_.-]*$ ]]
++ '[' 1 = 1 -a 0 -eq 0 ']'
++ echo 'Warning: If you intend to use torizoncore-builder as a server (listening to ports), then you should pass extra parameters to "docker run" (via the -- switch).'
Warning: If you intend to use torizoncore-builder as a server (listening to ports), then you should pass extra parameters to "docker run" (via the -- switch).
+++ curl -L -s https://registry.hub.docker.com/v2/namespaces/torizon/repositories/torizoncore-builder/tags
+++ sed -n -e 's/\("name"\) *: *\("[^"]\+"\)/\n\1:\2\n/gp'
+++ sed -n -e 's/"name":"\([^"]\+\)"/\1/p'
++ remote_tags=
+++ sed -n 's/^.*torizoncore-builder\s\+\([0-9]\+\).*$/\1/p'
+++ docker images torizon/torizoncore-builder
++ local_tags=
++ get_latest_tag ''
++ latest=0
+++ echo
++ return 0
++ latest_remote=0
++ [[ -z '' ]]
++ [[ -z '' ]]
++ [[ -z '' ]]
++ echo 'TorizonCore Builder is not installed. Pulling the latest version from Docker Hub...'
TorizonCore Builder is not installed. Pulling the latest version from Docker Hub...
++ pull_remote=true
++ chosen_tag=0
++ echo -e 'Setting up TorizonCore Builder with version 0.\n'
Setting up TorizonCore Builder with version 0.

++ [[ true == true ]]
++ echo -e 'Pulling TorizonCore Builder...'
Pulling TorizonCore Builder...
++ docker pull torizon/torizoncore-builder:0
Error response from daemon: manifest for torizon/torizoncore-builder:0 not found: manifest unknown: manifest unknown
++ echo 'Error: could not pull TorizonCore Builder from Docker Hub!'
Error: could not pull TorizonCore Builder from Docker Hub!
++ tcb_env_setup_cleanup
++ unset source
++ unset under_windows
++ unset user_tag
++ unset storage
++ unset volumes
++ unset network
++ unset remote_tags
++ unset local_tags
++ unset tag
++ unset latest
++ unset latest_remote
++ unset latest_local
++ unset pull_remote
++ unset chosen_tag
++ unset -f tcb_env_setup_usage
++ unset -f get_latest_tag
++ unset -f tcb_env_setup_check_updated

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

Did you like my answer? :+1: :-1:


TorizonCore Builder Installation Issue on WSL2

Based on your output, the issue is that the tcb-env-setup.sh script is failing to retrieve the list of Docker tags from Docker Hub, resulting in remote_tags= being empty and the script defaulting to version 0, which doesn’t exist.

Root Cause

The script uses this command to fetch available tags(1):

curl -L -s https://registry.hub.docker.com/v2/namespaces/torizon/repositories/torizoncore-builder/tags

When this fails to return valid tag data, the script falls back to version 0, causing the Docker pull to fail with “manifest not found”.

Solution

You can work around this issue by using the auto mode flag to bypass the tag detection entirely. The tcb-env-setup.sh script supports an auto mode that pulls the latest version without trying to parse the registry response(1):

source tcb-env-setup.sh -a remote

This will automatically use the latest version of TorizonCore Builder online without needing to parse the Docker Hub registry response.

Alternative Approach

If you prefer to specify a particular version, you can use the tag mode. First, check the available tags manually at the Docker Hub registry, then specify a known version:

source tcb-env-setup.sh -t <version_tag>

Replace <version_tag> with a valid version from the Docker Hub registry.

Verification

After successful setup, verify that the command is available(1):

torizoncore-builder --help

Important Notes

  • Remember to source the setup script every time you start a new terminal session(1)
  • The setup script installs Bash completion for TorizonCore Builder, enabling autocomplete with the TAB key(1)
  • Under Windows/WSL2, you may need extra parameters for server commands like ostree serve(1)

Best regards, Toradex AI Assistant.

I think I have found the answer myself. Our corporate proxy often causes issues for curl with ssl certificates. I modified the tcb-env-setup.sh script to add the “-k” option to curl disabling certificate verification and it completed successfully.

The correct way to resolve this kind of issue is to provide curl with the corporate ssl certificate.

I followed the info discussed in this superuser.com article and was able to execute the tcb-env-setup.sh setup script without having to add the -k option to curl.