gogo199432
(Gogo199432)
December 16, 2017, 2:57pm
1
Hey guys,
So I got my Raspberry Pi 3 yesterday and set out to setup my wordpress instance. I’m using the following images:
https://hub.docker.com/r/hypriot/rpi-mysql/ - For my database
https://hub.docker.com/r/arm32v6/wordpress/ - For wordpress (also tried v7)
The commands I use to set them up are the following:
docker run --name mysql -e MYSQL_ROOT_PASSWORD=**** -d hypriot/rpi-mysql
docker run --name wordpress --link mysql:mysql -p 8080:80 --restart always -it -d arm32v6/wordpress
Both of them show up correctly when I do a ‘docker ps’ . But for some reason whenever I go to localhost:8080 it says that it is unreachable. (I’m logged into the Raspberry through VNC and using the chromium browser there).
I reinstalled basically everything including docker itself several times, but nothing seems to be working.
sdetweil
(Sam)
December 16, 2017, 4:04pm
2
docker inspect the wordpress container… to look at the port mappings
sdetweil
(Sam)
December 16, 2017, 4:13pm
3
unreachable makes it sound like the browser doesn’t know where localhost is…
cat /etc/hosts
also try 127.0.0.1:8080
gogo199432
(Gogo199432)
December 16, 2017, 4:35pm
4
I’m guessing you meant this? There is quite a lot of output there, so let me know if this wasn’t what you were asking for
“NetworkSettings”: {
“Bridge”: “”,
“SandboxID”: “7e0a49bf535eeb9d78ea1e7bc94eb41d8e575f9f2c299f621a90f36b78183f51”,
“HairpinMode”: false,
“LinkLocalIPv6Address”: “”,
“LinkLocalIPv6PrefixLen”: 0,
“Ports”: {
“80/tcp”: [
{
“HostIp”: “0.0.0.0”,
“HostPort”: “8080”
}
],
“9000/tcp”: null
},
“SandboxKey”: “/var/run/docker/netns/7e0a49bf535e”,
“SecondaryIPAddresses”: null,
“SecondaryIPv6Addresses”: null,
“EndpointID”: “73ed0a1b11df82ee76592f96184e8e2b5368cdca3c141fbc734a612598736065”,
“Gateway”: “172.17.0.1”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“IPAddress”: “172.17.0.3”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“MacAddress”: “02:42:ac:11:00:03”,
“Networks”: {
“bridge”: {
“IPAMConfig”: null,
“Links”: null,
“Aliases”: null,
“NetworkID”: “e3bdddf9140cfded0a362d07c0a2bee03f5ace361344ddcd7e5024c8930e2cd8”,
“EndpointID”: “73ed0a1b11df82ee76592f96184e8e2b5368cdca3c141fbc734a612598736065”,
“Gateway”: “172.17.0.1”,
“IPAddress”: “172.17.0.3”,
“IPPrefixLen”: 16,
“IPv6Gateway”: “”,
“GlobalIPv6Address”: “”,
“GlobalIPv6PrefixLen”: 0,
“MacAddress”: “02:42:ac:11:00:03”,
“DriverOpts”: null
}
}
}
Also here is the content of the hosts file:
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
127.0.1.1 raspberrypi
Trying 127.0.0.1:8080 didn’t do anything, I get the same response
sdetweil
(Sam)
December 16, 2017, 4:39pm
5
“Ports”: {
“80/tcp”: [
{
“HostIp”: “0.0.0.0”,
“HostPort”: “8080”
}
],
“9000/tcp”: null
},
that looks good…
assuming vnc is causing some problem… if u do http://172.17.0.3:8080 from the container… it should work…
gogo199432
(Gogo199432)
December 16, 2017, 4:46pm
6
I’m not quite sure what you mean by from the container. How can I run chromium from within the container?
sdetweil
(Sam)
December 16, 2017, 4:48pm
7
sorry, brain fart… trying to make sure the address resolution is happening on the pi… not the system u are vncing from.
gogo199432
(Gogo199432)
December 16, 2017, 4:52pm
8
Well, I can physically connect my pc to the router that the pi is connected to through Wifi, but I get the same error there too when I try to use my browser.
sdetweil
(Sam)
December 16, 2017, 4:53pm
9
and when connected that way, you are doing http://pi_address:8080, right?
gogo199432
(Gogo199432)
December 16, 2017, 5:08pm
10
Yeah, more specifically 192.168.10.101:8080
gogo199432
(Gogo199432)
December 16, 2017, 5:57pm
11
The thing is that if I try another web-based container, for example this: https://hub.docker.com/r/hypriot/rpi-dockerui/
I can access it without a problem. So it isn’t my network, but something with wordpress maybe?
sdetweil
(Sam)
December 16, 2017, 7:01pm
12
maybe the wordpress app didn’t start for some reason
docker log container_id
might give u info
gogo199432
(Gogo199432)
December 16, 2017, 7:10pm
13
Not really, all I got was this:
[16-Dec-2017 18:41:27] NOTICE: fpm is running, pid 1
[16-Dec-2017 18:41:27] NOTICE: ready to handle connections