Issue with Accessing Bahmni Web UI – Docker Configuration and Potential Port Conflicts

I am reaching out for assistance with a problem I’ve encountered while setting up Bahmni on Docker. Despite following the necessary steps to install and configure the Docker container, I am unable to access the Bahmni Web UI at http://localhost:8080. Below is a summary of what has been done and the issues I have encountered.

Steps Taken:

  1. Docker and Bahmni Web Container Setup:
  • Docker was successfully installed on my system (Ubuntu 22.04 LTS via WSL 2 on Windows 11 Pro).
  • The bahmni/bahmni-web:latest container was pulled and started with the following command:

docker run -d -p 8080:80 --name bahmni-web-container bahmni/bahmni-web:latest


  * The container is confirmed as running by the `docker ps` command, with port 8080 exposed on the host and mapped to port 80 on the container.
2. **Access Issue:**
  * Despite the container running, attempts to access the web UI via `http://localhost:8080` result in the page not loading.
3. **Environment Variables and Previous Installations:**
  * Environment variables (`JAVA_HOME`, `PATH`, etc.) have been checked, as there were prior failed installations of OpenMRS and Apache Tomcat, which may have left conflicts or residual processes.
  * These previous installations could be causing conflicts with Docker and the Bahmni container.
4. **Port Conflicts:**
  * The issue may also be related to port 8080 being used by another process, as previous software installations may have left lingering processes.
  * I have attempted to change the port mappings and run the container on port 9090, but the issue persists.
5. **Docker Logs and Configuration:**
  * The logs for the Docker container did not reveal any errors, but the page remains inaccessible.

### **Potential Issues:**

1. **Port Conflict:**
  * Port 8080 might be occupied by a previous process or blocked by system configurations, affecting Docker's ability to properly expose the port.
2. **Previous Installation Conflicts:**
  * Environment variables or residual processes from the earlier OpenMRS and Tomcat setups may be interfering with the Bahmni container.
3. **Docker Networking/Configuration Issue:**
  * There could be a misconfiguration with Docker's network settings or a communication issue between the container and the host machine.

### **Next Steps Taken and Recommendations:**

1. **System Cleanup:**
  * I plan to run a Docker system prune to remove any unused containers, images, and networks that might be conflicting.
2. **Port Change:**
  * I will attempt to run the container on a different port (9090) and see if that resolves the issue.
3. **Network Diagnostics:**
  * I will inspect the network configuration and use tools like `netstat` to check if port 8080 is being used by another process.

I would appreciate any guidance or assistance you can provide to resolve this issue. Thank you for your time and support.