Test your Application Locally in a Docker Setup
 
  
 
	 
 
	 Prerequisites
 
		 
		  - Docker should be installed on your machine. 
		  
 
 
		
 
	  
 
	 Procedure
-  
		   Execute the command in a docker terminal. 
		   
		  
 
			 
docker run -i -d -p 8080:8080 bwce-http-reqresp-app 
 
		    
		 
-  
		  Execute the following command to views the logs to make sure that the application has successfully started. 
		   
		  
 
			 
docker logs <container name>
 
		    
		 
-  
		  Get the IP address for the Docker machine. 
		   
		
 
-  
		  Edit the 
			 request_news.html file. Replace the URL "http://127.0.0.1:8080" with the IP address of the Docker machine. 
		   
		
 
-  
		  Save the file. 
		   
		
 
-  
		  Open the 
			 request_news.html file in a web browser. 
		   
		
 
-  
		  Click the 
			 Get News from Wiki! 
			 button to request headlines from the associated web page. 
		   
		
 
 
   
Copyright © 2021. Cloud Software Group, Inc. All Rights Reserved.