Ports are not available: exposing port tcp 0.0.0.0:8080 -> 0.0.0.0:0: listen tcp 0.0.0.0:8080: bind: only one usage of each socket address (protocol/network address/port) is normally permitted.
It’s a sunny day and you are starting your docker container when you get this message: “Cannot start container … bind: address already in use” … hmm, now what? Sometimes, when trying to start your docker instance, it’s possible to be stunted by another process using the same port. However, there are a few options you have in this situation. The ones I have tried and use when needed are listed here: To quickly move forward with successfully starting your container, you could just kill whatever is using the port. I usually do that but first check what is using the port, and, if it is non-essential at this time, kill it.
Option 2
Option 3
sudo /etc/init.d/apache2 restart sudo apachectl -k restart Option 4
When in Doubt
Always refer to the official Docker documentation. The Docker team have created additional resources, both free and paid, to supplement their product, and additional community support. Community support is fantastic! It allows developers from all across the world to collaborate and connect.
If you are new to Docker, have a look at their 101 tutorial here, and their learning programs here. Best of luck, and happy coding!
About Curious Minds |