I have used the following command for port mapping
sudo docker run -d -p 3306:33060 --name App1 APP/framework:app
where 3306 port belongs to localhost machine MySQL and 33060 is the port into a docker container, so communication is happening between 3306:33060
in docker. I'm getting issue as below:
sudo docker run -d -p 3306:33060 --name App1 APP/framework:app fc1ffe98b2f2e6299a3070be8296d8b530ef4bdb3bd4cfd79d28ffc535a361c1
docker: Error response from daemon: driver failed programming external connectivity on endpoint App1 (30ec933973acf63a48ef9a20b0027af18bd23e1f36cf852e2e3e3758eaa1f843): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use.
I don't want mysql in docker container to create image.Just want to open random port and map 3306 and host-ip to communication with port in docker i.e 33060
Can anyone please suggest any way to resolve this that would be appreciated? Thank you.