Comments on How to Install WordPress with Docker on Ubuntu 15.04
In this tutorial, we will install WordPress by using multiple docker containers. Wordpress itself in one container and the MariaDB database in another container. Then we will install Nginx on the host machine as reverse proxy for the WordPress container.
18 Comment(s)
Comments
Hi there,
Have you implemented SSL yet?
Thanks!
You'll want to add to isntall the mariadb-client-core package on the host otherwise you wont be able to test the SQL container.
This is true. You will want to install the MariaDB client otherwise you will receive an error in Step 2 when running:
mysql -u wpuser -h 172.17.0.2 -p
For example in Ubuntu I had to run the following:
apt-get install mariadb-client-core-10.0
After installing the MariaDB client I was then able to run the 'mysql' command to login to the MariaDB.
That being said, this is the best tutorial I have seen for getting Wordpress up and running on Docker.
Can I ask why you don't install NGINX via docker as well?
Can I follow the same tutorial to install wordpress in docker on Arch Linux? (I am using Antergos)
Hi, how to run it on my localhost?
I am unable to access mysql as mentioned steps...please healp
mysql -u wpuser -h 172.17.0.2 -p
Me to!
ERROR 1045 (28000): Access denied for user 'wpuser'@'172.17.0.1' (using password: YES)
This means that you use a wrong password. Ensure that you enter the exact password that you have chosen for the MySQL user 'wpuser'.
Got issues here, after entering this ''mysql -u wpuser -h 172.17.0.2 -p''... it prompted for password and I used the same one ''wpuser@'' but it said ''ERROR 2003 (HY000): Can't connect to MySQL server on '172.17.0.2' (111 "Connection refused")''
Now I am stuck here
I had this exact same issue. For me, installing the mariadb-client-core package on my host machine fixed the issue. If you already have mariadb installed, remove the package and reinstall the client-core package.
Hi!
The tutorial worked fine (mostly) for me, however. Some docker networking questions pop up!The "wpcontainer" has a port mapping of 0.0.0.0:8081->80/tcp (listed in docker ps)However! The wp-admin install is already available on my LAN from other machinse on port 8081 - how come? so if I use my LAN address http://10.49.0.167:8081 i will get redirected to the wp install.
As far as I understand the port 8081 should not be exposed on my LAN through eth0, but only internally on the docker net - unless the docker is in bridge network mode (which docker ps does not tell me)? And it is mapped to port 80 internally, so inside the machine I can also curl to the wp install via http://172.17.0.2:80
--Docker Noob who is confused!Any insight or basic info regarding this available?
Can you update for the below OS + add lets encrypt:
Ubuntu 18.04 LTS
CentOS 8
Debian 10.2
Hi,
I couldn't make the tuto work so i decided to remove all i did, but docker doesnt allow me to remove images or containers from mysql and adminer. They keep on poping back when i stop them... Pls tell me how to remove them both definatively.
thx
How to resolve this one?
$ curl -I 192.168.43.99:8081 curl: (7) Failed to connect to 192.168.43.99 port 8081: Connection timed out
OS: Ubuntu 18.04 LTS
I can't tell when you made this comment, so I may be late to answer this, instead of using 192.168.43.99, you should use your own system's IP addrress. When you're on the same box (machine) you can use 127.0.0.1:8081 or "localhost:8081". If you're on another computer in the network then you might be able to use the ip-address of the computer hosting the docker container.
Hi Arul,
I am very happty to find exat solution. I hope so i will learn more
Used your examples to create some automated routines to start some Wordpress Blog containers.Partly used at https://Start.YourBlog.Today/ too ... No complaints received yet. Thank you!