Only one submission required per group.
In this exercise you will set up your own WordPress blog on your own computer thanks to Docker!
We will go over this in class to explain the details of the Docker Compose file sections.
Work together as a group on one machine on which Docker is working to do the following steps:
Start by creating a Docker Compose file named docker-compose.yml
containing the following:
Start up only your database server container:
docker compose up -d database
Now you’ll create a user in the database for your WordPress server. Run this command to get a MySQL prompt within your container:
docker compose exec database mariadb -u root -p
Enter the password you provided as the value of MYSQL_ROOT_PASSWORD
when prompted.
Execute the following database commands at the prompt one by one:
CREATE DATABASE wp;
CREATE USER 'wp'@'%' IDENTIFIED BY 'some_password';
GRANT ALL PRIVILEGES ON wp.* TO 'wp'@'%';
SHOW DATABASES
to make sure it shows up.quit
to leave the MySQL prompt and you will be back at your normal command prompt.Now, add the WordPress service to your Docker Compose file:
You should now be able to bring up your new container. You can take a shortcut by just running:
docker compose up -d
You will submit these two items to D2L:
Due date: before class on Tuesday, November 28th.