Five minute Wordpress in a Docker container.
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
It's that simple.
Enable UFW forwarding
and set
DEFAULT_FORWARD_POLICY="ACCEPT"
Enable UFW Firewall
Allow incoming connections
# 192.168.1.3 is my desktop host.
Configure a DNS server for use by Docker
and use
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
Pull and run a mysql container
Pull and run the latest wordpress container
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.
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
Enable UFW forwarding
Code:
vi /etc/default/ufw
DEFAULT_FORWARD_POLICY="ACCEPT"
Enable UFW Firewall
Code:
sudo ufw enable && ufw reload
Code:
ufw allow 2375/tcp ufw allow from 192.168.1.3 to any port 22
Configure a DNS server for use by Docker
Code:
sudo vi /etc/default/docker
DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
Code:
restart docker
Code:
docker run --restart=always --name mysql -P -e MYSQL_ROOT_PASSWORD=<secret_mysql_rootpassword> -d mysql:5.7
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
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.
Total Comments 0