Sub-process /usr/bin/dpkg returned an error code (1) when building my own cog Dockerfile


I am currently trying to build my own Cog image based on this Dockerfile :
Dockerfile.Cog (852 Bytes)
on my Verdin IMX8M Plus SoM in 5.7 Torizon OS Version.

When I try to build the image with the follwing command : “docker build -t cog .” I am getting the following errors :

I have tested the image on a 6.4 Os version using a 3 TAG_VERSION and it worked. Now I am using a 2 tag version for 5.7 version of Torizon OS.
I guess the problem comes from the version of the tag or the OS but it is not possible for me to upgrade the Torizon OS for now.
I have also tried to add “sudo apt-get install -f” into the docker file but it’s not working.

Thank you for your support,

Hi @Muzzy ,

Is there any particular reason why you’re rebuilding the entire Cog container? If you want to add any specific changes e.g. add other packages to it you can use our Bullseye Cog container image as a base to your custom image.

For example, given that you’re using Torizon OS 5, your Dockerfile can begin like this:

ARG IMAGE_ARCH=linux/arm64
# For iMX6 or iMX7 use:
# ARG IMAGE_ARCH=linux/arm





Best regards,
Lucas Akira

Hi @lucas_a.tx,

Thank you for your proposition thats what I did and it worked.
Thank you,



Glad I was able to help!

Best regards,
Lucas Akira