Auto-build Docker image for the 15mins EasyEngine target Ubuntu 14.04
849
Orchestrate/Pre-Build the 10-min EasyEngine WordPress deployment into Docker image.
1- Let's start
cp .env.sample .env
--> Edit and fill up blank fields in the file '.env' with your secret user & password
docker-compose up
Note that maria auto-generated password at /etc/mysql/conf.d/my.cnf will be ignored and replaced by your new one set at '.env'
== Tada ==
Pros:
Trade-off:
2- Just go and create your wordpress site, automatically
docker exec dockereasyenginewordpress_wp-ee-web_1 \
ee site create wp.example.dev --user=YOURUSER --pass=YOURPSW --email=YOUREMAIL
Note
3- Getting bored with that name, want to delete and create new site
docker exec dockereasyenginewordpress_wp-ee-web_1 \
ee site delete --no-prompt wp.example.dev
== Tada ==
Bonus: I used the following to create my Gcloud Docker VM ('docker-machine' required):
docker-machine create --driver google \
--google-project myDockerPrj \
--google-zone CHANGE-TO-YOUR-ZONE \
--google-machine-type g1-small \
--google-disk-size 30 \
myVM
docker exec dockereasyenginewordpress_wp-ee-web_1 bash
ee secure --auth
Once completed, we will be going to have
1- Vanilla Official Ubuntu:14.04 docker base image
2- EasyEngine base installation created
apt-get install wget
wget -qO ee rt.cx/ee && sudo bash ee
source /etc/bash_completion.d/ee_auto.rc
3- Next step is to run that base image and going inside setup the required stack and starting the services: MySQL (MariaDB), Web (Nginx + php5-fpm) and some admin utils
ee stack install
ee stack start
4- Once completed, a popular WordPress site is ready to get built automatically by the following command
ee site create wp.example.dev --user=YOURUSER --pass=YOURPSW --email=YOUREMAIL
ee site create wp.example.dev --user=YOURUSER --pass=YOURPSW --email=YOUREMAIL --wpsubdom
Alternative to step (3), we could create a pre-build stack image as follows
cd ee-stack
docker build -t ee-stack -f Dockerfile .
And then run ee-stack
docker run --rm -p 80:80 -p 443:443 -p 22222:22222 ee-stack
A file type mis-match warning could be ignored if encountered. Note that 'ee stack start' will be triggered automatically.
Review entrypoint for the stack services
docker exec -it ee-stack bash
-->#$ /startStack.sh
The pre-build Docker images are available to pull from Docker. Please see Docker Auto Build section.
docker run --rm --name wp-ee-stack \
-p 80:80 -p 443:443 -p 22222:22222 \
lamtrantuan/docker-easyengine-stack
sudo docker cp wp-ee-stack:/var/www/ /var/
sudo docker cp wp-ee-stack:/var/lib/mysql/ /var/lib/
docker stop wp-ee-stack
docker run --rm --name wp-ee-stack \
-p 80:80 -p 443:443 -p 22222:22222 \
-v /var/lib/mysql:/var/lib/mysql \
-v /var/www:/var/www \
lamtrantuan/docker-easyengine-stack
docker run --rm --name wp-ee-db -p 3306:3306 lamtrantuan/docker-easyengine-stack:db
docker run --rm --name wp-ee-web -p 80:80 -p 443:443 -p 22222:22222 lamtrantuan/docker-easyengine-stack:web
Content type
Image
Digest
Size
172.4 MB
Last updated
over 10 years ago
docker pull lamtrantuan/docker-easyengine-wordpress