I2c-tools install in docker fails with "The group `input' already exists"

I follow How to use I2C on Torizon | Toradex Developer Center
I want to install i2c-tools and I have dockerfile

ARG BASE_NAME=arm32v7-debian-qt5-wayland
FROM torizon/$BASE_NAME:buster
SHELL ["/bin/bash", "-c"]
RUN apt-get -y update && apt-get install -y
RUN apt-get install -y i2c-tools
RUN apt-get install nano -y ...

I run

docker build -t qt5-dev -f Dockerfile .

and I got

Setting up udev (241-7~deb10u7) ...
The group `input' already exists and is not a system group. Exiting.
dpkg: error processing package udev (--configure):
 installed udev package post-installation script subprocess returned error exit status 1
Setting up libgdbm-compat4:armhf (1.18.1-4) ...
Setting up libperl5.28:armhf (5.28.1-6+deb10u1) ...
Setting up perl (5.28.1-6+deb10u1) ...
dpkg: dependency problems prevent configuration of i2c-tools:
 i2c-tools depends on udev; however:
  Package udev is not configured yet.

dpkg: error processing package i2c-tools (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.28-10) ...
Errors were encountered while processing:
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/bash -c apt-get install -y i2c-tools' returned a non-zero code: 100

container from Dockerfile

FROM --platform=linux/arm torizon/debian:2-bullseye

SHELL ["/bin/bash", "-c"]

RUN apt-get -y update && apt-get install -y
RUN apt-get install -y i2c-tools

built successfully

How to install i2c-tools into a container on the arm32v7-debian-qt5-wayland ?

Hi @Juzujka,

Please avoid using Debian Buster, and use from now on Debian Bullseye on your container images for Torizon.

Please provide more information about your environment, as:

  • Which version of TorizonCore are you using?
  • Wich carrier board are you using?
  • Which model of Apalis iMX6 are you using?

About your issue, please have a look at the List of Container Images for Torizon, then, at the Qt Debian Container for Torizon.

I’d say that, in the end, the beginning of your Dockerfile should be something like:

 FROM --platform=linux/arm torizon/debian-qt5-wayland:2

Remember to add the permissions as presented at User-space Container Access for I2C on Torizon.

Best regards,
André Curvello

Greetings @Juzujka,

You are currently using the “buster” tag for your base image. Please use the “2” tag instead this is for the bullseye release of Debian and is where we fully implemented the groups for all the peripherals. I just tried your Dockerfile with this tag instead of buster and it works.

Best Regards,

Thank you, Jeremias!

Thank you, André!
With Bullseye it is built.

Good to know!

Best regards,
André Curvello