Today I encountered a very strange situation. After updating the docker image, I ran docker-compose up -d and the message Bind for 0.0.0.0:xxxx failed: port is already allocated appeared. After netstat -ap | grep xxxx, I found that a docker process had been occupying this port and the service could not be restarted. Through a series of solutions:For example, killing the process and restarting Docker did not succeed. I will then share a method that I hope will provide a solution to students who encounter the same problem. sudo cp /var/lib/docker/network/files/local-kv.db /var/lib/docker/network/files/local-kv.db_bk sudo rm /var/lib/docker/network/files/local-kv.db sudo docker-compose up -d Supplement: Solution to the docker port being occupied "port is already allocated" The Docker launcher displays "port is already allocated". I tried the following methods: 1. By restarting Docker 2. Restart your computer 3. Check the program corresponding to the occupied port and kill it 4. stop and rm all docker programs None of them work. SolutionThe problem can be solved by finding the docker-compose.yml file in the corresponding working directory and changing the occupied port to another port. The above is my personal experience. I hope it can give you a reference. I also hope that you will support 123WORDPRESS.COM. If there are any mistakes or incomplete considerations, please feel free to correct me. You may also be interested in:
|
<<: A detailed analysis and processing of MySQL alarms
WeChat applet trajectory playback mainly uses pol...
In web design, we often use arrows as decoration ...
This article shares with you a compound motion im...
Table of contents Docker custom network 1. Introd...
Ubuntu is a relatively popular Linux desktop syst...
I remember a question the interviewer asked durin...
<meta http-equiv="X-UA-Compatible" c...
1. Download related tools and images Download Lin...
Table of contents Date Object Creating a Date Obj...
1. When you open the web page, 503 service unavai...
How to install and configure MySQL on Mac OS 10.1...
The link-in style is to put all the styles in one...
The network configuration of Host Only+NAT mode u...
Apple Mug Icons and Extras HD StorageBox – add on...
Table of contents 1. Preprocessing 2. Compilation...