docker-compose up -d
In your webbrowser, type in: http://localhost:8080 This should display "It works!"
I did not have anything in my php-files
directory, so lets make something:
nano php-files/index.php
Add a simple line to the file:
<?php
echo "Hello, World!";
?>
mysql -h 127.0.0.1 -P 3306 -u root -p
doesn't work...
docker exec -it lamp_mysql_1 mysql -uroot -ppoopypants
works
If you have tried "upping" the compose previously, try:
docker-compose down
docker-compose up -d
You might have something running on the same ports. Try:
docker ps
docker stop <container_id>
docker rm <container_id>
(stop, rm all: docker stop $(docker ps -a -q)
Alternatively, change the ports in the docker-compose.yml
file.
In some cases, orphaned Docker networks might cause port conflicts. You can remove all unused networks using:
docker network prune