CodexBloom - Programming Q&A Platform

CentOS 8 - Docker Container scenarios to Start with 'scenarios: bind: address already in use'

👀 Views: 67 đŸ’Ŧ Answers: 1 📅 Created: 2025-06-11
docker centos networking bash

I need some guidance on I tried several approaches but none seem to work. I'm trying to implement I'm working with an scenario while trying to start a Docker container on my CentOS 8 machine. The command I use is: ```bash docker run -d -p 8080:80 my-web-app ``` However, I receive the following behavior message: ``` behavior: bind: address already in use ``` I checked the currently running containers with `docker ps` and confirmed that no other container is using port 8080. I also ran `netstat -tuln | grep 8080`, which returned no results. It seems that I should be able to start my container without any conflicts. To further troubleshoot, I stopped all containers using `docker stop $(docker ps -q)` and then attempted to restart my container again, but I still get the same bind behavior. I've also tried rebooting the system to ensure no processes are lingering, but the scenario continues. Does anyone have insights into what might be causing this scenario? I'm using Docker version 20.10.8 and CentOS 8. Any help would be appreciated! My development environment is macOS. How would you solve this? Has anyone dealt with something similar? I'm coming from a different tech stack and learning Bash. The project is a REST API built with Bash. What am I doing wrong?