How it works…

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:

To list all the Docker containers, whether they are running or not, we have to pass an additional flag, -a, as docker ps -a.

Browse http://localhost:8080/ or execute a GET call from the command line, as follows:

$ curl -X GET http://localhost:8080/
Hello World!

This will give us Hello World! as a response, which means the HTTP server is listening inside a Docker container at port 8080.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.143.4.181