I solved my own problem - I had to install dbus and make sure this got executed:
Ensure machine-id is generated to prevent PHP shell_exec from returning null
RUN dbus-uuidgen > /etc/machine-id &&
cp /etc/machine-id /var/lib/dbus/machine-id &&
chmod 644 /etc/machine-id /var/lib/dbus/machine-id