Installing Varnish to Wordpress Stack

I am trying to create my own wordpress server stack. I am using php7, mariadb, nginx. And they are work perfectly but i want to add varnish to server. I can't find any clear document about how to install varnish for wordpress. So anyone knows any link for that?