WordPress on Azure Container Instance

  • fennng 

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.




您的电子邮箱地址不会被公开。 必填项已用*标注