From the course: Docker for Developers
Docker concepts and use cases for developers - Docker Tutorial
From the course: Docker for Developers
Docker concepts and use cases for developers
- [Instructor] When you look at why Docker was created and why it is popular, it is mostly for its ability to reduce the amount of time it takes to set up the environments where our applications run and are developed. Just look at how long it takes to set up an environment where you have a Node and Express API for backend, which also needs Mongo. And then if you add your applications or frontend, you may need to set up several pieces there too. And that's just to start. Then, when your team grows, and you have multiple developers working on the same frontend, backend, and therefore, they need to set up the same resources in their local environments for testing purposes, how can you guarantee every developer will run the same environment, resources, let alone the same versions? All of these scenarios play well into Docker's strengths, where its value comes from setting containers with specific settings, environments, and even versions of resources. And simply type a few commands to have Docker set up, install, and run your resources automatically, and more often than not, much faster too. And these are the scenarios we'll cover in this course. So let's go briefly over the main components. A container is basically where your application or a specific resource is located. For example, you could have the Mongo database in one container, then the frontend React application, and finally your Node, Express server in a third container. Then you have an image, which is from what the container is built. The image contains all the information that our container needs to build a container exactly the same way across any systems. It's like a recipe. Then you have volumes, which holds the data of your containers. So if your applications are on containers, which are static and unchanging, the data that changes is on the volumes. And finally, the pieces that allow all these items to speak is networking. Yes, that sounds simple, but understand that each container in Docker have no idea of the existence of each other. They're fully isolated. So unless we set up networking in Docker, they won't have any idea how to connect to one another.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.