Hello everybody. Today we are going to continue this docker course. So let's talk about class 3, which will be installing servers in Docker. So come on. Show the points we are going to talk about today. Let's start the content, remembering that we have other classes that explain how to start a container and today we will show you how to install an APACHE server inside a container and we will access this APACHE using the host machine and we will start another container and also access this Apache server . The objective of the class is to get a server working inside a container and show that it is also accessed by both the host machine and other clients. And then we will create an image of this container with the server because then you can use this image to raise container instances. This way, you will already have the server installed. So let's go ah yes ... there is a question from our friend ... he is asking ... If you have used the servers in the docker? So if you've used servers in Docker, pause and comment if you've already used them. And also what have you been finding about the use of docker servers. So come on, start a container. So to start a container we've already learned in another class. Let's start a container here in the background, let's name it my_webserver and it will be with the debian image and then we'll access this container. So let's access sudo docker run here... We've already started here the container is already in the background. Now let's run this container OK, we're inside the container and let me see what I prepared here for you... Now let's install APACHE for that let's update and let's use apt-get update then let's apt- get install apache2 net-tools ... net-tools to get access to ifconfig and netstat. So let's go to the terminal here. Ok, the update is done Now let's go to the next step ... apt-get install apache2 net-tools You agree Ok finished the installation and we also have videos about APACHE both running http and also installing https. I'll leave it here on the card and I'll also put it in the description. Here we are installing apache in a simple way just for us to show it in Docker. So come on, we've already installed it and let's check it out by starting the server. service apache2 start It was ok here it is already started. So we can check... how do we install net-tools let's check netstat -anlt | grep :80 ... ... I'm checking port 80 here using the netstat command so we can see it's already listening on port 80. Ok, so now we can do a test... Let me see what's going on prepared here... to do the test we will use the browser, for example, on the real machine. It is important to identify what the IP of this container is. So here it already informs when APACHE got up it informed here what the IP was. If by chance you didn't see this moment when it was shown The IP can give ifconfig ... And here you will see the IP that the container is using. So, let's raise a Firefox on the host machine here ... 172.17.0.2 and ready here we are already accessing the container's Apache. Beauty very well. Let me see the next step here... Now we are going to access Apache using another container. So let's go with another container. So let's leave this container even leaving this continues because it is running in the background and we will start another container here sudo docker -it will go straight into the container has for us to do and we will call the client container and will use the Alpine have to Cause it's lighter ... Ok, we're inside the client so here we can give an ifconfig to see the client's IP which is the end 0.3. So let's access the server there. Remembering that on the final server the IP was 0.2 Let's use wget 172.17.0.2 Ok we downloaded the page index.HTML. To Dalbert I want to see this page. You can take a cat index.html And you see the page there And here we have the beginning of the page Ok , let's see the next step here. Now we're going to create a docker image of your server. Then we're going to use the COMMIT we 've already seen in the image creation class. I'll leave the Card here. let's go to COMMIT Let's get out of this container which in this case giving an EXIT will turn it off. sudo docker commit And the container I'm trying to generate the image. So it's my_webserver and the image name ... here we could give a name referring to the use of Debian and for Apache .... we could put something like debian_apache debian_apache_img ... Ok, it was generated and let's see sudo there docker images and ready here is our image. So from this image I can lift the apache container lift whenever I want. Let's see here... Ok, comment there if you liked it or if you have any questions. In the next class I would like you to choose the topic we can put docker network types. Then show some types of networks that exist and how to use networks in Docker. Or we could see more about servers in Docker letter B. And letter C would be transferring files in docker. So tell me what you want to see in the next class on Docker. see you all