Make official Docker images smaller
Hi @mikolajpabiszczak Can you please resolve conflicts? Thank you! From what I see the Dockerfiles used to build official images were move to [tensorflow/build](https://github.com/tensorflow/build) rendering this PR as out-of-place. Closing.
This PR is added as a follow-up of Issue #59293 - it updates the Dockerfiles so that they consistently use `apt-get -y clean all && rm -rf /var/lib/apt/lists/*`, `apt-get install -y --no-install-recommends`. Thus making official Docker images smaller.

With this update the change in size of the Docker image is the following:
- `cpu.Dockerfile`: 2.07GB -> 1.76GB
- `gpu.Dockerfile`: 6.63GB -> 6.52GB

(I skipped the comparison for other Dockerfiles).
