昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期一, 二月 12, 2018

Wordpress on Azure Container Instance

In my last post, I tried out using Azure Container Instance to host a simple HTTP service. Today, I am going to host wordpress on it. 

Once loginned, run the following command:

az container create --name wp --image wordpress --resource-group testACI --ip-address public --port 80



You can find the full image name from docker hub: https://hub.docker.com


Use the ip address and port number from the output

Navigate it from a browser:



Choose the language and next



Now you will need to connect to a database



Let's create one, in this example, I will use a mysql database



Enter database details



Then wait



Once finished, you can see all the info of this sql server





Telnet to test the server 




To make things simple 

I disabled SSL and enable Azure service



Before connecting from wordpress to mysql, we need to create a database for wordpress. I use phpmyadmin in docker to do this:

docker run --name myadmin1 -d -e PMA_HOST=feng-test-mysql.mysql.database.azure.com -p 8070:80 phpmyadmin/phpmyadmin










Now enter the database detail to wordpress














Now my wordpress is ready to use, remember to update the URLs when a domain name is used.



--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.