¿Cómo iniciar Docker si la dirección ya está en uso?

¿Cómo iniciar Docker si la dirección ya está en uso?

¿Cómo puedo iniciar Docker en Ubuntu 20.04 si me indica que la dirección ya está en uso? Lo intenté

docker-compose up -d
Starting relaatiotietokannat_db_1 ... 
Starting relaatiotietokannat_db_1 ... error

ERROR: for relaatiotietokannat_db_1  Cannot start service db: driver failed programming external connectivity on endpoint relaatiotietokannat_db_1 (02444b3d0c2841a4fe702cf2705fbd5a869e44e7f258ecfbcea764ead989fcb4): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use

ERROR: for db  Cannot start service db: driver failed programming external connectivity on endpoint relaatiotietokannat_db_1 (02444b3d0c2841a4fe702cf2705fbd5a869e44e7f258ecfbcea764ead989fcb4): Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Respuesta1

El error dice que 3306otro proceso ya está utilizando ese puerto. Debe detener ese proceso y liberar el puerto o indicarle dockerque use otro puerto. Puede averiguar qué proceso está utilizando actualmente el puerto 3306ejecutandonetstat -lntep |grep 3306

información relacionada