Run Docker Image on Local Machine

Run Docker Image on Local Machine

  1. Right-click on the productsservice:1.0.0 image we created earlier and select Create Container.

Architect

  1. A Docker image configuration popup will appear. Choose Run and the terminal will execute.

Architect

  1. Configure the Docker container:

    • In the Services interface, select the Dashboard tab and then click Add under Ports.

Architect

  1. A Port bindings popup will appear. Click Modify Options, then select Host IP.

Architect

  1. Enter 0.0.0.0 for the Host IP.

Architect

  1. Similarly, configure Host Port as 8081 and Protocol as TCP.

Architect

  1. For –publish, enter 8081 and select Recreate container.

Architect

Test Application on Postman

  1. Run the project and test on Postman by creating an HTTP GET request with the URL http://localhost:8081/api/products.

Architect