If anyone is just using shared runners on Gitlab and have the same issue, following the advice from glaskever fixed the problem.
Moving from docker:19.03.12-dind
to docker:27.5.1-dind
.
Context: I was just creating an image using gitlab and running a simple command like RUN docker-php-ext-install pcntl
triggered the problem.
Hope it helps.