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 a web application Docker container from the web-application-image, assigning the container name as web-application-container using the --name flag, as follows:

$ docker run --net=my-bridge-network -p 8090:8080 --name web-application-container -d web-application-image ef9c73396e9f9e04c94b7327e8f02cf57ce5f0cd674791e2805c86c70e5b9564

The --net flag specified in the docker run command connects the mysql-container to the my-bridge-network. The -p flag specified in the docker run command publishes the container's 8080 port to the host 8080 port. 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 web-application-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