Version in “./docker-compose.yml” is unsupported

Posted by


Solution 1:

Step 1: To change port 3306:

If another process or container on your system already has port 3306 occupied and you cannot turn it off, you can try changing the port of your MySQL container. In the Docker compose or Docker command, modify the port number to another number in the Ports section of the MySQL container. For example:

      - "3307:3306"

Step 2: Restarting the Docker daemon:

Sometimes issues occur in Docker daemon that cause such errors. You can try restarting the Docker daemon

sudo systemctl restart docker

After that run

docker-compose up

Solution 2:

Step 2: Check for existing processes

First, check to see if port 3306 is being used by any other processes or services that are currently operating on your host computer. You can run to accomplish this:

sudo netstat -tuln | grep 3306

Step 2: Check Docker containers:

docker ps

Step 3:Stop conflicting containers:

If you find a container using port 3306, you can stop it using:

docker stop <container_id>

Step 4: Restart Docker service:

sudo service docker restart

Thanks for Reading.

Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x