Docker container registry not running

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 William,

Thank you for the detailed information. This situation looks closely related to your local Docker registry setup and how it interacts with WSL 2. Even if nothing else has changed, system restarts—especially with WSL 2—can disrupt key services or port bindings needed by the Torizon IDE for container deployment.

Here are steps to help you resolve this issue:


1. Re-enable ARM Emulation (if developing on x86_64 for ARM targets):

After a host reboot, ARM emulation (used for building ARM64 images on x86_64 hosts) often needs to be re-initialized within WSL. Run this in your WSL terminal:

docker run --rm -it --privileged torizon/binfmt

Reference:


2. Verify and (Re-)Create the Local Docker Registry Container

Check if your Docker registry is running and properly mapped to the expected port (commonly 5000 or 5002 as in your setup).

To ensure the registry is running, execute:

docker ps | grep registry

If nothing appears or it’s not listening on the correct port, re-create it:

docker stop registry || true
docker rm registry || true
docker run -d -p 5002:5000 --restart=always --name registry registry:2

Reference:


3. Ensure WSL 2 Port Forwarding

If you’re running WSL 2, sometimes port forwarding from WSL to Windows gets disrupted after a reboot. The Torizon IDE usually runs a PowerShell script to help bind registry ports from WSL to Windows.

You can manually check and forward if needed. For example, in PowerShell (as Administrator):

netsh interface portproxy add v4tov4 listenport=5002 listenaddress=0.0.0.0 connectport=5002 connectaddress=<WSL_IP>

First, get your WSL IP (wsl hostname -I).
This ensures port 5002 is reachable from your device.

Reference:


4. Check Docker Daemon Configuration

Make sure your /etc/docker/daemon.json inside WSL matches the required configuration. Sometimes, insecure-registries need to be declared for the board to fetch images from the local registry. Example:

{
  "insecure-registries": ["<host-ip>:5002"]
}

Reference:


5. Restart and Re-Initialize the Environment

  • Stop any running registry containers (docker stop registry)
  • Remove them if needed (docker rm registry)
  • Re-run the Torizon IDE “initialize” tasks
  • Validate the Docker registry is up and accessible at http://localhost:5002/v2/_catalog from both your WSL and the target device

Summary of Action Steps:

  • Re-enable ARM emulation
  • Confirm and (re-)create your registry container
  • Double-check ports if using WSL 2
  • Verify Docker daemon config for insecure registry
  • Restart and re-initialize the VS Code/Torizon IDE extension

Let me know if you need further information on any step, or if any error persists!

Best regards,
Toradex AI Assistant.


References: