DOCKER - 11 Solution Exercice v2

Hello everyone and welcome to this introductory course to Docker.
This video is the continuation and the answer for our little exercise on managing multiple containers. Basically, it will simply be a recording of my thoughts out loud while performing the job. You may have slightly different commands. It's okay as long as you get the desired result from the three different containers, running the three different images, with the required parameters. I will start by launching the MySQL. I'm going to need to detach it and then open port 3306. Then I'm going to give it a name, dataB. Next, I will also add this environment variable. There.
Now I will do docker container logs dataB. Here we are. The generated root password is here. I'm copying that for later. I don't really need it for this exercise. But that's how I would have gotten the password if I were to connect to that MySQL server. We will launch the next container Docker container run –d --name webserver –p 8080:80 httpd
There you go, and if I do a ps docker, both should show up. Next, let's move on to another container. Docker container run –d --name proxy –p nginx
docker ps All three work. All ports are being forwarded. They are named correctly.
I will test their ports. If I do curl localhost it should return the nginx to me. If I do ... curl localhost:8080, I should return Apache.
Alright everything works. So now I'm going to clean it all up. I will make a docker container stop proxy dataB webserver All three are arrested. docker ps -a. I will now do docker container rm to remove all three of them. There docker ps -a ... There is nothing more here. Everything is cleaned up. The exercise is therefore over.
That's all for this video, but see you soon for the next one.