LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > Spock's Brain
User Name
Password

Notices


Rate this Entry

Five minute Wordpress in a Docker container.

Posted 10-01-2015 at 04:22 PM by Habitual
Updated 10-09-2015 at 12:20 PM by Habitual

Environment...
Ubuntu 14.04.3 LTS from mini.iso in a Virtualbox v4.3.18 host w\20G hd with 3.13.0-65-generic kernel.
No tasksel packages other than ssh during install.

Prerequisites
Docker requires a 64-bit installation.
Ubuntu: kernel must be 3.10 at minimum.

Installation
Code:
apt-get install -y curl && curl -sSL https://get.docker.com/ | sh
It's that simple.

Enable UFW forwarding
Code:
vi /etc/default/ufw
and set
DEFAULT_FORWARD_POLICY="ACCEPT"

Enable UFW Firewall
Code:
sudo ufw enable && ufw reload
Allow incoming connections
Code:
ufw allow 2375/tcp
ufw allow from 192.168.1.3 to any port 22
# 192.168.1.3 is my desktop host.

Configure a DNS server for use by Docker
Code:
sudo vi /etc/default/docker
and use
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"

Code:
restart docker
Pull and run a mysql container
Code:
docker run --restart=always --name mysql -P -e MYSQL_ROOT_PASSWORD=<secret_mysql_rootpassword> -d mysql:5.7
Pull and run the latest wordpress container
Code:
docker run --restart=always --name wordpress --link mysql -p 8080:80 -e WORDPRESS_DB_USER=root -e WORDPRESS_DB_PASSWORD=<secret_mysql_rootpassword> -d wordpress
Check Wordpress application
http://<ip_of_virtualbox_host>:8080

The "--restart=always" options allow for persistence across reboots of the VM.

root user executed throughout.

Enjoy the Goodness.
Posted in Uncategorized
Views 3198 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:31 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration