Hello, I followed the tutorial exactly as you described in the video. I'm on Windows 11, and the Docker Compose you set up with my hostname launches the container correctly, but when I try to access localhost, it doesn't resolve. Do you know what could be the issue?
Hi. Sorry to hear that. Try following these steps and let me know if you are still having some issues: 1. Check running containers: Run docker ps to ensure the containers are up. 2. Verify port mapping: Ensure your docker-compose.yml file maps the correct ports (e.g., 80:80). 3. Check firewall settings: Make sure port 80 is not blocked by your firewall. 4. Reset Docker network: Run docker network prune, then docker-compose down and docker-compose up to reset the network. 5. Use your IP instead of localhost: To access the service, use your machine’s IPv4 address from ipconfig. 6. Check if the service is listening on port 80: Run docker exec -it bash, and inside the container, use netstat -tuln to check port 80. 7. Try Docker’s internal IP: Find the container’s IP using docker inspect | grep "IPAddress" and try accessing it.
Very nice 👍🏽
Thank you! Cheers!
22:03 docker-compose file
Hello, I followed the tutorial exactly as you described in the video. I'm on Windows 11, and the Docker Compose you set up with my hostname launches the container correctly, but when I try to access localhost, it doesn't resolve. Do you know what could be the issue?
Hi. Sorry to hear that. Try following these steps and let me know if you are still having some issues:
1. Check running containers: Run docker ps to ensure the containers are up.
2. Verify port mapping: Ensure your docker-compose.yml file maps the correct ports (e.g., 80:80).
3. Check firewall settings: Make sure port 80 is not blocked by your firewall.
4. Reset Docker network: Run docker network prune, then docker-compose down and docker-compose up to reset the network.
5. Use your IP instead of localhost: To access the service, use your machine’s IPv4 address from ipconfig.
6. Check if the service is listening on port 80: Run docker exec -it bash, and inside the container, use netstat -tuln to check port 80.
7. Try Docker’s internal IP: Find the container’s IP using docker inspect | grep "IPAddress" and try accessing it.