Docker build blocked

Hi to all

I have the following problem: when I give the command “sudo docker build --no-cache --build-arg UID=$(id -u) -t ubuntu_ubuntu18 .” the build procedure is blocked in

[+] Building 0.0s (0/0)

and if I give the command top I have the git process that occopy at least 13% of CPU has elapsed an hour and the situation is still the same.

I have ubuntu 22.04

Any ideas?

My Dockerfile is:

FROM ubuntu:18.04
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y upgrade
ARG UID=1001

# Essential Yocto Project host packages are:
RUN apt-get update
RUN apt-get install -y gawk wget git-core diffstat unzip texinfo gcc-multilib \
          build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \
          xz-utils debianutils iputils-ping python3-git python3-jinja2 libegl1-mesa libsdl1.2-dev \
          pylint3 xterm rsync bsdmainutils

# Additional host packages required by poky/scripts/wic
RUN apt-get install -y curl dosfstools mtools parted syslinux tree tzdata vim libtool libsdl2-2.0-0

# Add "repo" tool (used by many Yocto-based projects)
RUN curl http://storage.googleapis.com/git-repo-downloads/repo > /usr/local/bin/repo
RUN chmod a+x /usr/local/bin/repo

RUN apt-get install -y git kernel-package fakeroot libncurses5-dev libssl-dev ccache lzop
# Create user "user"
RUN id user 2>/dev/null || useradd --uid $UID --create-home user

# Create a non-root user that will perform the actual build
RUN apt-get install -y sudo
RUN echo "user ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers

# Fix error "Please use a locale setting which supports utf-8."
# See https://wiki.yoctoproject.org/wiki/TipsAndTricks/ResolvingLocaleIssues
RUN apt-get install -y locales
RUN dpkg-reconfigure locales
RUN locale-gen en_US.UTF-8
RUN update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8

ENV LANG en_US.UTF-8
USER user
CMD "/bin/bash"

# EOF

Is this the only output?

Please share the output of the following commands:

docker version
docker info

and you can also try if this command makes any difference

sudo docker build --progress=plain --no-cache --build-arg UID=$(id -u) -t ubuntu_ubuntu18 .

or

DOCKER_BUILDKIT=0 sudo docker build --progress=plain --no-cache --build-arg UID=$(id -u) -t ubuntu_ubuntu18 .

ok thanks, I’ll try and check the output