Open
Description
The docker/Dockerfile uses a multi-stage approach to build several related images. However, something is broken since every SPKG is built (at least) twice during a run of .ci/build-docker.sh.
As a result, building docker images takes a very long time and, with this bug, likely exceeds the limits of most CI providers.
Component: docker
Issue created by migration from https://trac.sagemath.org/ticket/32998