For some reason, $HOME is empty which causes a lot of issues with some packages. Could you update the image to set $HOME=/home/ubuntu?