It is more likely that the container image was already pwned, as other users had the same issue, see:
https://unix.stackexchange.com/questions/757120/how-was-my-p....
Edit: It can also happen with the official image: https://www.postgresql.org/about/news/cve-2019-9193-not-a-se...