Hi All, are you fine? Because in the next few words I will repeat a “famous” question:
Why apache/laravel server configuration needs a 0.0.0.0 for localhost when I run their container in a docker-machine?
Any times I get up a docker-machine, any container I will set it needs a specific IP configuration in apache/laravel config-file.
So, let me show you a little shell-stuff
1) Jump in!
I have a docker-machine driver=virtualbox, with a specific IP address (192.168.99.100:2376) and inside i put a container with
docker run -ti --name=FunnyBunny debian
2) Install common-stuff
I just followed Laravel-wiki to install laravel or, for apache machine I choose a digitalocean tutorial: please this is not any kind of adv-strategy: Google shows these!
3) let’s start!
For laravel I need to use (ok, port is not the real problem)
php artisan serve --localhost=0.0.0.0 --port=8080
And as the same way for apache, I need to configure file
modify ServerName to
And, in the end, modify ports.conf in
and modify Listen in that way
So, I’m sure to give more details that you need, but the point still here: Why I need to add ip 0.0.0.0 for these kinds of services, when put the same container out docker-machine (just run docker without eval-command) I don’t need to do them?
Thank you so much!