Consent to the use of Personal Data and Cookies

This website needs your consent to use cookies in order to customize ads and content.

If you give us your consent, data may be shared with Google.

Ports are not available ... address already in use

How to fix a problem that happens when another container is occupying the specified port in Docker.

8 views

Edited: 2022-04-08 07:44

Error response from daemon: Ports are not available: listen tcp 0.0.0.0:3306: bind: address already in use

This error can happen because:

  1. Another docker container is already occupying the port; the solution is to first shut down the container occupying the port before starting another one. E.g. Run docker-compose down in the directory where you ran docker-compose up.
  2. A service on the host is occupying the port. E.g. MySQL running on the host and occupying port 3306.

Tell us what you think:

  1. How to fix a problem with composer in Docker that results in: failed to open stream: No such file or directory error for InstalledVersions.php.

More in: Docker