python: update Dockerfiles
Update base image in Dockerfiles to the latest available tags. See https://hub.docker.com/_/python
Clean up the apt cache by removing /var/lib/apt/lists
it reduces the image size, since the apt cache isn't stored in a layer.
Do not cache downloads when installing a package via pip.
Edited by Dmitry Petrov