How build own Docker image in Golang

I need build some Docker image directly from my Golang application. I spent some time on Google but I didn’t find any fully functional example of Goland code…

And then I had to write my own implementation of this functionality.

Here we go!