Using the Torizon IDE extension from MAC to Ubuntu Machine

Hello everyone …

I’m using the Torizon IDE extension on an Ubuntu 22.04 machine.
I access it from a Mac (ARM) VSCode.
In a directory on the Ubuntu machine, I have a Docker build project with various compose files and a device connected.
If I access this environment from a Windows machine, I can start a docker compose configuration by right-clicking and selecting compose up.

On the Mac, I get an error message like this:

 *  Executing task: docker compose -f 'docker-compose-display.yml' up -d --build 

unable to get image 'abc/networkcontrolrestapi:0.2': error during connect: Get "http://192.168.88.34:2375/v1.49/images/abc/networkcontrolrestapi:0.2/json": dial tcp 192.168.88.34:2375: connect: no route to host

The IP address of the Ubuntu machine with the Docker registry is different. For example, 192.168.88.57.

When I read the environment variables on the Mac, I get a line with DOCKER_HOST=192.168.88.34

Overwriting the var using export -n does not help.

Does anyone have experience with this problem?

Grettings
Gerald

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:


Hello Gerald, thank you for your question!

From your description, it appears that the Torizon IDE extension (running in your VS Code on Mac) tries to connect to Docker at the IP 192.168.88.34:2375—an address that’s not accessible or correct for your Ubuntu Docker host (which should be 192.168.88.57). You also identified that the DOCKER_HOST environment variable on your Mac is set to the wrong IP and attempts to change it with export -n don’t fix the problem.

Here are some troubleshooting suggestions to help you resolve this:

1. Check Workspace and User Settings

The Torizon IDE extension (and Docker extensions for VS Code) often reference the DOCKER_HOST variable either from the shell, VS Code settings, or environment files. Make sure none of the following are still pointing to the old host (192.168.88.34):

  • Your macOS shell environment (~/.zshrc or ~/.bashrc)
  • VS Code workspace settings (.vscode/settings.json)
  • VS Code user settings
  • Any .env files in your project directory

2. Explicitly Set the Docker Host in VS Code

To ensure VS Code uses the correct Docker host:

  1. Open the command palette (Cmd+Shift+P), type Preferences: Open User Settings.
  2. Search for docker.host.
  3. If set, update the value to tcp://192.168.88.57:2375 (replace with the IP of your Ubuntu host).

You can also set this in .vscode/settings.json in your project:

{
  "docker.host": "tcp://192.168.88.57:2375"
}

3. Relaunch VS Code

Closing and reopening VS Code (or using the “Developer: Reload Window” command) will ensure any updated settings or environment variables are picked up.

4. Confirm Docker Access

From your Mac terminal, try:

export DOCKER_HOST=tcp://192.168.88.57:2375
docker version

If you get a response, you should be able to connect to Docker on the Ubuntu machine.

5. Remove Old Environment Variables

If a stale DOCKER_HOST keeps getting set, check for any login scripts on your Mac or global variables in your profile files:

grep DOCKER_HOST ~/.zshrc ~/.bashrc ~/.profile ~/.bash_profile

Remove or update any occurrences, then reload your shell.

6. Check Compose Task Definitions

If you use VS Code “tasks” for Docker Compose actions, check if any hardcoded DOCKER_HOST values or other scripts are present in .vscode/tasks.json.


For more on customizing workspace and environment settings in Torizon IDE projects, review:
Add Packages, Libraries, Tools and Files

If you adjust these settings to use the correct Docker host, your compose commands from the Mac should work just like on Windows.

Let me know if this helps or if you need further details!

Best regards,
Toradex AI Assistant.

I managed to remove the incorrect environment variable using the following method:

  • Disable Torizon Extension for Workspace
  • export -n DOCKER_HOST
  • Reload Window
  • Enable Torizon Extension

Everything worked fine again yeah :smiling_face_with_tear:

Hello @gerko,

Thanks for sharing your solution. If you have other questions, feel free to open new tickets.