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.

156 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. Here is the reason why the Shopware build script may not progress beyond: Dumped plugin configuration.
  2. 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