How do I enable access from external hosts to the webserver contained in a container of my Docker host?

Asked

Viewed 513 times

0

I created a php site with Laravel and in order not to have to install the Windows development environment on my pc I used the laradock to test my project. Now I want to access my site from an external host on my local network, however I can only access the site on the host Docker where the containers Docker laradock is running. Here it is explained how the network in Docker works. I want to expose my container that is running the webserver to the local network. The following picture explains the situation I want to do.
inserir a descrição da imagem aqui
Remarks:
1. I have configured the laradock for multiple projects.
2. I run the following containers with the command:

Docker-Compose up -d Nginx mysql phpmyadmin

  • Put your Docker-Compose.yml, it’s easier to understand

  • It’s the same as laradock:https://github.com/laradock/laradock/blob/master/docker-compose.yml I only changed the database.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.