About the Tutorial
Download 5.51 Mb. Pdf ko'rish
|
Docker Tutorial - tutorialspoint.com
Step 5: Run the env command in the new container to see the details of how to connect
to the MongoDB server container. Step 6: Now it’s time to connect to the MongoDB server from the client container. We can do this via the following command: mongo 172.17.0.2:27017 The following points need to be noted about the above command The mongo command is the client mongo command that is used to connect to a MongoDB database. The IP and port number is what you get when you use the env command. Once you run the command, you will then be connected to the MongoDB database. Docker 100 You can then run any MongoDB command in the command prompt. In our example, we are running the following command: use demo This command is a MongoDB command which is used to switch to a database name demo. If the database is not available, it will be created. Now you have successfully created a client and server MongoDB container. Docker 101 NGINX is a popular lightweight web application that is used for developing server-side applications. It is an open-source web server that is developed to run on a variety of operating systems. Since nginx is a popular web server for development, Docker has ensured that it has support for nginx. We will now see the various steps for getting the Docker container for nginx up and running. Step 1: The first step is to pull the image from Docker Hub. When you log into Docker Hub, you will be able to search and see the image for nginx as shown below. Just type in nginx in the search box and click on the nginx (official) link which comes up in the search results. Download 5.51 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling