I'm trying to generate a multi-container Docker WordPress deployment on Beanstalk by running a Dockerrun.aws.json file from the EB CLI. Here's my Dockerrun:
{
"AWSEBDockerrunVersion": 2,
"containerDefinitions": [
{
"name": "mariadb",
"image": "mariadb:latest",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 3306,
"containerPort": 3306
}
],
"environment": [
{
"name": "MYSQL_USERNAME",
"value": "root"
},
{
"name": "MYSQL_PASSWORD",
"value": "password"
},
{
"name": "MYSQL_DB_NAME",
"value": "wordpress"
}
]
},
{
"name": "wordpress",
"image": "wordpress",
"essential": true,
"memory": 128,
"portMappings": [
{
"hostPort": 80,
"containerPort": 80
}
],
"links": [
"mariadb"
],
"environment": [
{
"name": "MYSQL_ROOT_PASSWORD",
"value": "password"
}
]
}
]
}
The Beanstalk environment launches properly and I can browse to the endpoint and begin the WordPress configuration, but it never connects to the MariaDB. When I SSH into the host instance, I can see that both the WordPress and MariaDB containers are launching over and over again - and failing. There are multiple mariadb-* log files in /var/log/containers/ on the host, all with this text:
error: database is uninitialized and password option is not specified
You need to specify one of MYSQL_ROOT_PASSWORD,
MYSQL_ALLOW_EMPTY_PASSWORD and MYSQL_RANDOM_ROOT_PASSWORD
My guess is that the password isn't making it through. Any ideas why not? Thanks