Ports are not available ... address already in use
How to fix a problem that happens when another container is occupying the specified port in Docker.
156 views
Edited: 2022-04-08 07:44
Error response from daemon: Ports are not available: listen tcp 0.0.0.0:3306: bind: address already in use
This error can happen because:
- Another docker container is already occupying the port; the solution is to first shut down the container occupying the port before starting another one. E.g. Run docker-compose down in the directory where you ran docker-compose up.
- A service on the host is occupying the port. E.g. MySQL running on the host and occupying port 3306.
Tell us what you think: