Accessing lamp container over lan using Kitematic

614 views Asked by At

I have a basic Lamp container installed and running using Kitematic. I want to access the url over lan for testing purpose.

1

There are 1 answers

0
Jeffrey Morgan On

Enabling bridged networking on the dev VM should allow you to do this, though it requires take a few steps for now. Make sure you understand the security implications of allowing all other machines on the network to contact the VM.

  1. Add a third network adapter in the VM settings pane. For Name, choose the adapter or network on which you want your VM to be accessible.

  2. To get the the IP of the VM, type the following on CLI:

docker-machine ssh dev

ifconfig

And look for the IP with the same subnet as other machines on the network. E.g. 192.168.0.x

  1. Open the web preview as usual in Kitematic.

  2. Lastly, replace the IP in the browser bar with the one found in step 3.

This should be accessible to other machines on the network.