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 it works…

Login into an EC2 instance and verify whether the Docker container has been created and is running successfully by executing the following command:

$ docker ps

Once the preceding command has executed successfully, it will give us the running Docker container details, as shown in the following screenshot:

Get the public DNS of an EC2 instance and execute a GET request from the command line as:

$ curl -i -X GET http://ec2-172-31-34-99.compute-1.amazonaws.com/

This will give Hello World! as a response, as shown in the following output:

 HTTP/1.1 200 OK Date: Sat, 06 Jan 2018 12:49:28 GMT Content-Length: 12 Content-Type: text/plain; ...

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