Preface:

To run an autoscalable WordPress blog via Docker Container in the cloud, simply follow the instructions below.

Instructions:

To create a WordPress blog in the Amazon Cloud, register with AWS and navigate to EC2 Container Service in the menu, here, for example, the link to Frankfurt:

https://eu-central-1.console.aws.amazon.com/ecs/home?region=eu-central-1#/clusters

There you click on Task Definition, below that you will find Create new Task Definition and then Configure via JSON:

task_definition

Now a new area opens in which you can copy the following:

{
  "containerDefinitions": [
    {
      "name": "wordpress",
      "links": [
        "mysql"
      ],
      "image": "wordpress",
      "essential": true,
      "portMappings": [
        {
          "containerPort": 80,
          "hostPort": 80
        }
      ],
      "memory": 500,
      "cpu": 10
    },
    {
      "environment": [
        {
          "name": "MYSQL_ROOT_PASSWORD",
          "value": "password"
        }
      ],
      "name": "mysql",
      "image": "mysql",
      "cpu": 10,
      "memory": 500,
      "essential": true
    }
  ],
  "family": "hello_world"
}

 

After clicking on Create, the task definition is created and ready to start.

We click on Cluster and then on Cluster Default:

run_task

Now we create a service via Create, after filling it out we start the task in the Tasks tab with Run Task.

As soon as the task is started, you can click on it and read out the public IP.

task_link

en_USEnglish