Issue building docker image

Hello,
DK: Verdin Dev Board kit
SOM: Verdin NXP i.MX 8M

I’m following the steps here: How to use Cameras on Torizon | Toradex Developer Center
After doing:
git clone --branch bullseye GitHub - toradex/torizon-samples: All sample code related to TorizonCore project.
cd ~/torizon-samples/gstreamer/bash/simple-pipeline
docker build --build-arg BASE_NAME=wayland-base-vivante --build-arg IMAGE_ARCH=linux/arm64/v8 -t myusername/gst_example .

I’m getting the following error:
ERROR [2/2] RUN apt-get -y update && apt-get install -y --no-install-recommends libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly …

I’ve edited the dockerfile several times to try different base names, image arch and image tags, but I always get the same error.
The current arguments in the dockerfile are:
ARG BASE_NAME=wayland-base-vivante
ARG IMAGE_ARCH=linux/arm64/v8
ARG IMAGE_TAG=3
ARG DOCKER_REGISTRY=torizon
Same error.
Thanks for your help in advance.

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

I’m sorry to hear you’re having trouble building your Docker image. Let’s go through some steps to troubleshoot and hopefully resolve the issue:

  1. Network Connectivity: Ensure your development environment has internet access, as ‘apt-get’ needs it to fetch packages from Debian repositories.

  2. Verify Package Names: Double-check the package names in your Dockerfile. Make sure they are correct and available in the Debian repositories for the base image you are using.

  3. Base Image Compatibility: Confirm that the base image (wayland-base-vivante) is compatible with your TorizonCore version. You can verify this by checking the Toradex Docker Hub for the correct tags and versions.

  4. Update Package Lists: Ensure that ‘apt-get update’ completes successfully before running ‘apt-get install’. This step updates the package lists and is crucial for installing packages.

  5. Check Dockerfile Syntax: Review your Dockerfile for any syntax errors that might affect the build process.

  6. Repository Access: Sometimes, the issue might be due to temporary unavailability of Debian repositories. You might try building the image at a different time or check if there are any known issues with the repositories.

If these steps do not resolve the issue, consider simplifying the Dockerfile to isolate the problem. For instance, try building a minimal image with just the ‘apt-get update’ and ‘apt-get install’ commands to see if the error persists. This can help identify if the problem is with the specific packages or the overall setup.

I hope this helps you get your Docker image built successfully. If you have any more questions, feel free to ask.

Best regards, Toradex AI Assistant.

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

Your GStreamer installation is missing a plug-in.

Greetings @asr_syk,

What version of Torizon OS are you using on your Verdin i.MX8M Plus? If you’re on some version of 6.X, then you should be using the bookworm branch of that repository. I did a quick test and built the sample image on the bookworm branch and the image built successfully on my side.

If you still have issues with that, then you could share the full error message. You only shared a portion of it in your initial post, which makes it difficult to tell what kind of error you got.

Best Regards,
Jeremias

Hi Jeremias,
The Torizon OS is: TorizonCore 6.8.0+build.22 (kirkstone)
I also tried the bookworm branch and still get errors:

ERROR [2/2] RUN apt-get -y update && apt-get install -y --no-install-recommends libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreame 0.3s

ERROR: failed to solve: process “/bin/sh -c apt-get -y update && apt-get install -y --no-install-recommends \tlibgstreamer1.0-0 \tgstreamer1.0-plugins-base \tgstreamer1.0-plugins-good \tgstreamer1.0-plugins-bad \tgstreamer1.0-plugins-ugly \tgstreamer1.0-libav \tgstreamer1.0-tools \tgstreamer1.0-x \tgstreamer1.0-alsa \tgstreamer1.0-gl \tgstreamer1.0-gtk3 \tgstreamer1.0-pulseaudio \tv4l-utils \t&& if [ "${IMAGE_ARCH}" = "linux/arm64/v8" ]; then \t\tapt-get install -y --no-install-recommends \t\tgstreamer1.0-qt5; fi \t&& apt-get clean && apt-get autoremove && rm -rf /var/lib/apt/lists/*” did not complete successfully: exit code: 1

Are you sure that is the full error message? It doesn’t really describe what went wrong exactly. It says there is an error, but it doesn’t say what the error was specifically.

As I said previously I built the sample container image from scratch, so I’m fairly confident it does build successfully.

If I were to take a guess at what your issue might be. I assume you’re building this on your development PC, correct? If that is the case did you make sure to enable arm emulation, so that arm/arm64 based-containers can be built on a non-arm machine?

Details about enabling arm emulation can be found here: Configure Build Environment for Torizon Containers | Toradex Developer Center

Best Regards,
Jeremias

That is indeed the full error message.
The issue was exactly the one you pointed out. After running the command that enables arm emulation I was able to build the image with no problem. I really appreciate your help on this!
Thank you!

Glad I could be of help.