Are you sure it is running and not just frozen somehow?
One way you can test someting like this is running a container using a simple docker run -it imagename bash command and using apt install there from the terminal.You can also try with only one package and an other aftet that. Even if the container can’t access the repository it should fail sooner with a timeout.