Then you’ll need to learn what docker is, read the understanding docker page:
And then go install docker and run their hello-world example:
Now hopefully you have the basics of go and docker down, so let’s grab an existing microservice and set it up.
On your docker host run:
wget https://github.com/danzel/go-docker-playground/archive/master.tar.gz tar -zxf master.tar.gz cd go-docker-playground-master docker build --tag=danzel/go-docker-playground:1.0 .
This will fetch and then build this docker image which contains a simple web server. Now we can start it up with:
docker create --name=test -P danzel/go-docker-playground:1.0 docker start test
Then you should be able to open it by browsing to http://dockerhostip:port