- 1 year ago
Laradock: docker-compose.yml is invalid format (PORT[/PROTOCOL]) on Windows
If you're encountering the "docker-compose.yml is an invalid format (PORT[/PROTOCOL])" error when using Laradock on Windows, it might be due to a compatibility issue with the port mappings in the docker-compose.yml
file.
To resolve this issue, you can try the following steps:
Open the
docker-compose.yml
file in a text editor.Look for the
ports
section within the file. It typically appears under theservices
section for each container.Ensure that the port mappings are in the correct format, which is
HOST_PORT:CONTAINER_PORT
. Here's an example of how theports
section should look:yamlports:
- "8080:80"
In the above example, port
8080
on the host machine is mapped to port80
inside the container.Make sure that the
ports
section does not include any protocol specification, such astcp
orudp
. Thedocker-compose.yml
file should only include the port mappings without any protocol information.Save the
docker-compose.yml
file.Retry running the Laradock containers using the
docker-compose up
command.
By ensuring that the port mappings in the docker-compose.yml
file are in the correct format and don't include any protocol specification, you should be able to resolve the "docker-compose.yml is an invalid format (PORT[/PROTOCOL])" error.