Docker Image creation failed due to non-zero code:100

I am running the below commands for creating a docker manifest

FROM debian:12-slim

RUN apt-get -q update && \
    apt-get install -q -y --no-install-recommends \
      xorg \
      unzip \
      tzdata \
      ca-certificates \
      wget \
      icu-devtools \
      curl && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*  

ENV DEBIAN_FRONTEND noninteractive

However during the image creation process, it is failing error:

The command '/bin/sh -c apt-get -q update &&     apt-get install -q -y --no-install-recommends       xorg       unzip       tzdata       ca-certificates       wget       icu-devtools       curl &&     apt-get clean &&     rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100

Looks like RUN is converted to /bin/sh -c,and returning a non-zero code:100.

Kindly suggest for an alternative

All run instructions are executed in a shell. That’s normal. And the error message is not the exact command that fails. Quotation marks are missing from these kind of errors. What happens is that the command you run simply fails and you need to find out why. Run a container interactively from the base image and execute the commands manually.

If I had to guess, I would say you added the ENV variable to the end of the file instead of before the RUN instruction so APT could ask for use rinput. If it is true, then running the commands interactively would not fail.

If run in Docker Desktop, don’t see a problem -

However it is failing during the pipeline execution

Notice what I wrote about running the command interactively. Also please, don’t share screenshots of texts. Follow the below guide to format your post and use code blocks. You can see how it looks like after I edited your first post