Creating production image throws error

Hi,
I am using torizon vscode extension to run and deploy pyside2 application on torizon verdin IMX8mm board. I am able to run the application on the board using “run-container-torizon-release-arm64” from task runner. But creating a production images always throws error " docker compose build `
** | ~~~~~~~~~~~~~~~~~~~~~~**
** | Program “docker” ended with non-zero exit code: 17. "**

Similarly if I run the command with + f5 I am getting following error.
"Invalid message “noDebug” is not supprted with “attach”

Can anyone share some light on this?
Thanks
Pramod

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?

:+1: :-1:


Hello,

The errors you’re encountering seem to be related to two distinct issues. Let’s address them separately:

  1. Docker Compose Build Error: The error message indicating that the program “docker” ended with a non-zero exit code: 17, suggests there might be a problem with your Docker setup or the Docker Compose file itself. Ensure that Docker is correctly installed and running on your development machine. Also, verify the syntax and settings of your Docker Compose file. Sometimes, issues arise from incorrect service configurations or paths that are not correctly mapped. Additionally, ensure that your Docker environment is set up to build images for the ARM64 architecture, as this is required for the Verdin iMX8MM board.

  2. Invalid Message “noDebug” Error: This error typically occurs when there’s a misconfiguration in the launch settings within VS Code, specifically related to debugging configurations. In the context of using the Torizon VS Code extension, ensure that your launch.json configuration is correctly set up for deploying and debugging applications on Torizon. The “noDebug” issue suggests that there might be an attempt to run a debug session without proper support for the debugging feature in the current context. Review your launch.json file to ensure it’s correctly configured for your deployment and debugging needs.

For both issues, it’s crucial to ensure that your development environment is correctly set up for cross-compilation and deployment to the Torizon platform. This includes having the correct versions of the Torizon VS Code extension, Docker, and any necessary dependencies for your PySide2 application.

If after checking these points the problem persists, it might be helpful to look into the specific configurations of your project and the detailed error logs provided by both Docker and VS Code. This can offer more insights into what might be causing these errors.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Verdin AM62 | Toradex Developer Center.

Greetings @samalpamod,

Program “docker” ended with non-zero exit code: 17.

This is a pretty generic error message and doesn’t tell us much. There wasn’t anymore to the log output of the task?

Similarly if I run the command with + f5 I am getting following error.
"Invalid message “noDebug” is not supprted with “attach”

In VSCode F5 is usually the shortcut for starting debug. The error message here suggests something is wrong with the debug configuration. Did you change the launch.json file in your project?

Best Regards,
Jeremias

Hi Jeremias.tx,
Please find the detail error that shows in the terminal. I am not sure where to look for the logs. But it seems while composing it throws the error.

Blockquote
invalid tag “samalpramod@gmail.com/pyside2:techgreen”: invalid reference format
NativeCommandExitException: /home/samalpramod/PySide2/.conf/createDockerComposeProduction.ps1:138:1
Line |
138 | docker compose build `
| ~~~~~~~~~~~~~~~~~~~~~~
| Program “docker” ended with non-zero exit code: 17.

  • The terminal process “pwsh ‘-nop’, ‘/home/samalpramod/PySide2/.conf/createDockerComposeProduction.ps1’, ‘/home/samalpramod/PySide2’, ‘samalpramod@gmail.com’, ‘techgreen’, ‘’, ‘pyside2’, ‘-vivante’” terminated with exit code: 1.

Blockquote
For running the application with <ctrl +f5> it throws error

Blockquote

Invalid message “noDebug” is not supported for “attach”

Blockquote
I have not changed the launch.json file. Attached the launch,json file here for reference.
launch.json (1.3 KB)

Thanks
Pramod

I believe the issue is you’re trying to name your container image samalpramod@gmail.com/pyside2:techgreen. The character @ is not a valid to be used in Docker container image names.

I assume you’re trying to push this container image to your Dockerhub registry, correct? I can see your registry name is just samalpramod/*: https://hub.docker.com/u/samalpramod

Why are you trying to name your container image with your email address?

Best Regards,
Jeremias

Hi Jeremias,
No I am not naming my container image as samalpramod@gmail.com/pyside2:techgreen. I am using task runner to create a production image. While executing the task it asked for my docker registry and password which I did provide. The Torizon task might be need my docker registry credential to push the image to my docker registry which is dockerhub. I am not providing any name as the task does not prompt any name for the image. It only prompts docker registry name, password, archtecture and tag name. Hope this is clear now.

Thanks
Pramod

No I am not naming my container image as samalpramod@gmail.com/pyside2:techgreen

It can be clearly seen from your logs that your container image is trying to be named as samalpramod@gmail.com/pyside2:techgreen. You must have entered this in some field in the extension at some point, otherwise the extension would not have made this name out of nothing.

Could you share your .vscode/settings.json file from your VSCode project. This would show the information the extension is using to create your container image name.

Best Regards,
Jeremias

Hi Jeremias…tx,
As I said before I am sending my docker credential as asked by the createProductionImage.ps. Anyway I am attaching my .vscode/setting.json file for your reference.
settings.json (792 Bytes)

Thanks
Pramod

From your settings.json I can see you have docker_login set to samalpramod@gmail.com. This is the issue, you should put your username for Dockerhub here not your email address. So in your case I would assume it would be samalpramod based on what I saw in your Dockerhub registries.

The extension names your container images in the form of <docker_login>/<project name>:<docker_tag>.

Best Regards,
Jeremias

Confusion arose as I am able to login to dockerhub using both email and username. Thanks for pointing me that. issue resolved.

Glad I was able to help clarify.