All about docker volumes and  Docker Networking

All about docker volumes and Docker Networking

🌎Docker volume:

  • Docker volume is a special container for storing important data.

  • It keeps data safe even if other containers are restarted or removed.

  • Think of it as a storage box that can be shared between different containers and your computer.

  • It's like having a secure place to keep files and databases when using Docker.

  • Docker volumes ensure data availability and easy movement, which is helpful for various applications and businesses.

🌎Docker networking:

  • Docker networking is like connecting different virtual containers together.

  • It allows these containers to communicate and share information.

  • It's like building a bridge between isolated containers, enabling them to work together.

  • This networking capability lets applications in containers talk to each other and the outside world.

  • It's similar to how your computer connects to the internet and interacts with other devices.

Task:

  1. Create a multi-container docker-compose file which will bring UP and bring DOWN containers in a single shot (Example - Create application and database container)

    step 1: clone the repo and check whether it is cloned or not.

    step 2: Now go to the directory and perform ls command:

    step 3: Check the docker file

    step 4: check the running container using docker ps

    see there are no running containers now.

    step 5: Use the docker-compose up command to start a multi-container application and docker-compose scale command to increase or decrease the number of replicas for a specific service.

    step 6: let's check your browser

    step 7: Use the docker-compose ps command to view the status of all containers, and docker-compose logs to view the logs of a specific service.

    step 8: Use the docker-compose down command to stop and remove all containers, networks, and volumes associated with the application

    For another Docker concepts.

    Follow me on LinkedIn to see interesting posts like this : )

    linkedin.com/in/prabir-kumar-mahatha-6a0025..

    visit my git hub profile: github.com/PrabirKumarMahatha

Â