• 欢迎订阅我的Youtube频道
  • 欢迎加入我的电报群

WordPress on Azure Container Instance

网站建设 fennng 1年前 (2018-02-11) 1044次浏览 0个评论

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


峰享技术 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:WordPress on Azure Container Instance
喜欢 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址