Mystery DATABASE_USER=ubuntu Setting

Sounds rather similar to this issue that popped up recently - upstream changes in the official PostgreSQL image: