Accessing a wordpress website container from a different machine does not display images?

0

So I setup a wordpress website inside a docker container as on this website. When I run docker compose the containers spin up just fine and I am able to access my wordpress website from the host machine's (ubuntu) browser by going to http://0.0.0.0:32768 - all good!

Issue is when I try accessing the website from another computer in the LAN. I type the ip of the container host x.x.x.x:32768 and voila it loads the web page on this 2nd machine. But, the formatting and images on the website are all broken.When I hover over a broken image , it says the image location is 0.0.0.0:32768/wp-contents/a1.jpg

I try clicking on this link and it says website not found Now I change the 0.0.0.0 to the ip address of the container host , x.x.x.x:32768/wp-contents/a1.jpg and it loads the image just fine!

So basically my question is how can I get the 2nd machine on the lan to consider all 0.0.0.0:32768 to be the container host ip address?

sum1

Posted 2017-05-17T10:25:29.210

Reputation: 11

Answers

0

Fixed it!!

I just had to login into wordpress and then Go down to Settings > General From here I was able to set port and static ip( same as container host).

The website loads just fine on the other machine within my lan network with all the images/formatting!

sum1

Posted 2017-05-17T10:25:29.210

Reputation: 11