O'Reilly logo

Go Web Development Cookbook by Arpit Aggarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it…

Execute the docker run command to create and run a Docker container from the golang-image, assigning the container name as golang-container using the -name flag, as follows:

$ docker run -d -p 8080:8080 --name golang-container -it golang-image 9eb53d8d41a237ac216c9bb0f76b4b47d2747fab690569ef6ff4b216e6aab486

The -d flag specified in the docker run command starts the container in a daemon mode and the hash string at the end represents the ID of the golang-container.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required