Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

docker: Error response from daemon: Address already in use

Tags:

docker

I am creating a container with following command

docker run -it -p 81:80 -p 3307:3306 --net mynet123 --ip 172.18.0.22 -v /opt/lampp/htdocs:/var/www/html lamp-setia bash

Can Someone share the solution?

Thanks In Advance

like image 333
ShaanSetia Avatar asked Dec 17 '22 20:12

ShaanSetia


1 Answers

You can check the existing port by running command

lsof -i tcp:81

and

lsof -i tcp:3307

if necessary you can kill that process with command

kill -9 [pid number]

After that, you can try to re-run that docker command.

like image 197
Darryl RN Avatar answered Jan 27 '23 20:01

Darryl RN