the easiest way now is to use docker with preinstalled solaris in container - here link to one prepared by cosmiqwork. After running the container you can run your code on container.