Time required: 2 Hours
Using many of the Docker commands we have learned, we install, start, and verify a MySQL container on the underlying host system.
In this lab, we put into practice some of the Docker commands that we have learned. Using what we know, we will instantiate a Docker container running MySQL and then use a typical client to connect and verify functionality, then end the lab by stopping and deleting the container instance.
1. Install Docker and configure the service so that it is running.
2. Pull the MySQL Docker container from Docker Hub.
3. Instantiate a container from that image, called 'test1-mysql', check the MySQL documentation from the Docker Hub instance to be sure it is started with the necessary parameters.
4. Verify the container is running using the appropriate Docker commands.
5. Note the IP address of the container using the appropriate Docker commands.
6. Install the MySQL client on the underlying host system (lab server).
7. Connect to the MySQL container instance via the MySQL client and log in.
8. List the databases in the container using the MySQL client to verify functionality.
9. Stop the container instance, and verify it has stopped.
10. Delete the MySQL container completely from the host system.
11. List all stopped containers to verify it has been removed.