Now we are running both containers front and container and a service container in different depths here.
And then this load to look and demonstrate to you how you are able to run containers in detached mode.
Let's hope both containers bypass and key combination control.
See zero for front and application.
Docker container will stop and let's stop API container.
Similarly, as we did four front and container control.
See?
Container will stop.
And if I leased containers now Docker bills, I will see no containers that account Iran and no less
Iran, both front and container and API container in the.
Using this D option and notice that now you could run Docker containers anywhere in any path.
You don't need necessarily to see to API or front and folder.
I could even see, for instance, to use a home directory and Ron Docker containers here.
Docker run this option with exports.
Same as before 50 50 for API.
A service and container port is saying 50 50 and next, let's at best option.
The best and afterwards will be name of the Image Images Gallery.
This API let's run this first container.
No, here in this output.
After such command, I see success of the container that was started.
And if I enter Docker voice command, I see that now there is container running and then similar weight.
Let's run one more front and container Docker run DSP.
Now we export port three thousand to the same port three thousand.
Let's also add this deep detection option.
Images Gallery.
Front end loaders name of the image for front end container.
Let's run it.
Also, a showcase of the newly created container.
Here it is.
And now I should see two containers up and running.
Here they are.
Here are names that were generated for new containers because those containers are brand new containers
previously around containers.
Arnold stopped, and now I'm able to verify whether our front end service works as before.
Let's go to web browser and refresh page here.
Notice that you need to wait a bit until you'll see actually result in a web browser because npm start
actually along with just script executable and it creates development, react, build and it takes some
time.
All right, Page was finally loaded.
And no, let's try to search for some image, for instance, laptop.
And a good result, it means that our back and EPA service works as well, and now we are running both
containers in the test mode.
And no, here in the terminal, you could perform other actions while containers are still running the
ground.
Let me now demonstrate to you how you could stop one of the containers if you want to do so.
Let's, for instance, stop.
Image Gallery API, a container with such name affectionate hoover.
Let me take this name and run following command.
Docker stop and hero based the name of the container.
The discount Iranian Docker has stopped corresponding container.
And if I enter Docker as now, I should see only one front and container.
I could run stopped containers again by using Docker Start Command.
And here will be the name of the stop container Docker start.
Container will start it.
Let's have a look at least of county run containers and the gain.
There are two of them.
Front end and API great.
This how you could run containers in the taste mode in background and the similar way you could run
all the containers if you want to do so.
Also notice that if you want to have a look at logs of specific containers because actually we don't
see any output, you could do so by using the following command Docker logs.
And here will be the name of the container, for instance, this one.
Like that?
And here are logs that were generated by our front and container.
Similarly, you could have a look at the logs of and a container, for instance this one.
Let me quote this name Docker logs.
Paste this name here and now I see logs from the flask application.
No, you don't required to run the front end and the day of service somewhere else separately in different
tabs using Docker.
You could very easily run both services in the background.
For now, we're done with this first step.
We created Docker files both for front end and API applications.
And now we are moving to the next step and we will adopt Docker compose and we will use it in order
to start front end and API services simultaneously using just one command.
And afterwards, we will extend Docker Compose set up and we will add such containers as Maunga and
Mongo Express, and all those containers will be stored only using one command.
And this beauty of Docker.
So let's next at Docker compose file and at local instructions for starting front AMP and API containers.
I'll see you guys just in a bit.