I have a docker container A. There are two applications ( B&C) running in the container A in Ports 8080 and 8081( TCP ports). I would like to write a python/nodejs or bash script to check if ports are open by respective applications?
Usecase:
- Get Hostname of the docker container
- Validate if both applications A and B opens the port to Ports 8080 and 8081.
- Once validated, i need to print that test has passed and print exit status.