optimize docker image size and autodiscover latest PMS version

Docker image size is reduced by 20%