First up: I’m using the Torizon IDE Extension Version 2.6.1
I’m currently facing a problem while executing the task “create-production-image”.
I’m getting the following error:
✅ Image rebuild and tagged
Pushing it registry-1.docker.io/name/blub:dev ...
WARNING! Your password will be stored unencrypted in /home/name/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credential-stores
Login Succeeded
The push refers to repository [registry-1.docker.io/name/blub]
5f70bf18a086: Layer already exists
6fb9fdf45b52: Preparing
9941c763881c: Preparing
c4da7908c3a7: Preparing
874d1477bc45: Preparing
13428921f9fd: Waiting
93e721acb2bf: Waiting
6276833ee9ba: Waiting
3c0ada878a44: Waiting
0aacfb63173d: Waiting
8af58a1087f3: Waiting
cf87d58e3447: Waiting
a952ee443b89: Waiting
09e5baefd1cb: Waiting
8e67ba77a27c: Waiting
744e0280e655: Waiting
880cb5b5dcf7: Waiting
cb3cbe811155: Waiting
07d2ee3f5712: Waiting
denied: requested access to the resource is denied
NativeCommandExitException: /home/name/Projects/Blub/backend/.conf/createDockerComposeProduction.ps1:152:1
Line |
152 | docker push $env:DOCKER_LOGIN/${imageName}:$tag
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Program "docker" ended with non-zero exit code: 1.
* The terminal process "pwsh '-nop', '/home/name/Projects/Blub/backend/.conf/createDockerComposeProduction.ps1', '/home/name/Projects/Blub/backend', 'name', 'dev', 'registry-1.docker.io', 'blub', ''" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
Some days ago this error doesn’t happened. So maybe there is a bug in the newest Torizon IDE Extension version?
In the settings.json the entry "docker_registry": "registry-1.docker.io", is created if I leave the Input for Container registry empty (which I have to for DuckerHub). Previously the entry "docker_registry": "", was created. Due to this, it is tried to push the docker image to the DockerHub like this:
docker push registry-1.docker.io/name/blub:dev
But this doesn’t match with the DockerHub repository anymore… it should be:
docker push name/blub:dev
So what happened here? Am I doing anything wrong or is it a bug?
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
Hello Uwe,
It looks like the issue you’re encountering is related to the way the docker_registry setting is being handled in the latest version of the Torizon IDE Extension. Specifically, the extension is prepending registry-1.docker.io/ to the image name, which is causing the push to fail.
From your description, it seems that previously, when you left the Container registry input empty, the docker_registry setting was set to an empty string (""). This allowed the Docker push command to use the default DockerHub repository format (name/blub:dev). However, in the latest version, it appears that the extension is now setting docker_registry to registry-1.docker.io by default, which is not compatible with the expected DockerHub repository format.
To resolve this issue, you can manually edit the settings.json file in your workspace to set the docker_registry to an empty string. Here’s how you can do it:
Open the .vscode/settings.json file in your project workspace.
Locate the docker_registry setting.
Change its value to an empty string, like this:
"docker_registry": ""
This should prevent the extension from prepending registry-1.docker.io/ to your image name and allow the Docker push command to use the correct format.
If this workaround resolves your issue, it might be worth reporting this behavior to the Toradex support team or the Torizon IDE Extension maintainers so they can address it in a future update.
There does seem to be something going on here. I tried the same thing on my side and I didn’t get the same error as you did, but it also didn’t really work either. My logs look like this:
The extension claims the push succeeded even though the last line mentions a timeout. When I check my DockerHub account I don’t see this container image anywhere. If I manually push it:
Then that works without me needing to rename it and I see it on my DockerHub immediately. Even though I didn’t get the exact same issue as you did, the behavior here does seem odd. Let me report this to our extensions team.
I got quick feedback from the team. They were able to reproduce your error on their setup. Your intuition is correct, it seems to be a bug that was introduced in the recent version of the extension. The team will try to investigate and fix this issue in short-order if possible.
The team just informed me that they published a fix for this issue. This is in V2.6.2 of our extension. After updating the extension, you’ll need to either create a new project in VSCode. Or, update your current project as documented here: Update Project from Template | Toradex Developer Center