Cannot run systemd in container

I am unable to run systemd in a container. The example at

https://hub.docker.com/r/centos/systemd/

works fine on Ubuntu host. But on Docker for Mac, it is not working and is giving the error

Failed to get D-Bus connection: No such file or directory