Could we help you? Please click the banners. We are young and desperately need the money
Docker users on Ubuntu or Linux Mint may encounter an error attempting to run a Docker container that uses port 80 reading something along the lines of:
Ports are not available: exposing port TCP 0.0.0.0:80 -> 0.0.0.0:0: listen tcp 0.0.0.0:80: bind: address already in use
Some Ubuntu and Linux Mint installations seem to run the Apache2 service by default, resulting in port 80 getting blocked. You can confirm this by visiting "localhost" in a web browser, which will display an Apache2 manual page by Ubuntu:
The fix is easy; stop Apache2 from running (on startup).
sudo systemctl stop apache2
sudo systemctl disable apache2
sudo lsof -i :80
You should now be able to start your Docker container without facing any issues regarding port 80 being blocked or unavailable.