Docker packages apps into a single unit, called an image. When these images are run via Docker, they're called containers, where a single container is an instance of an image. It's possible to run many containers based on a single image.
Docker packages apps into a single unit called an image. 0:00 When these images are run via Docker they're called containers. 0:04 Where a single container is an instance of an image, 0:08 it's possible to run many containers based on a single image. 0:11 You can think of a container as a shipping container, just like you'd see on ships. 0:15 Within each shipping container could be many different kinds of contents. 0:20 But because they're all uniform in shape, 0:24 they can all be handled the same way even though their content is different. 0:26 Usually the contents of a container are related in some way and 0:31 will be delivered to the same location. 0:34 In Docker, the contents of a container come together to form a singular unit 0:36 that represents an app, service, website or any single piece of software. 0:41 Docker packages the programs, services, and libraries your app depends on in to 0:46 an image along with your instructions on how to run it. 0:50 And the environment it should run in. 0:54 This all gets taken by docker and run on the host machine as a container. 0:56 An image is a mutable file that essentially a snapshot of a container. 1:00 They're created with the build command. 1:05 And they produce a container when started with the run command. 1:07 Images can be stored in the Docker registry, which is like a GitHub for 1:11 Docker images. 1:15 Then they could be retrieved later on the system where you wanna deploy them. 1:16 Because images can become pretty large, 1:20 they're designed to be composed of layers of other images. 1:22 That means, we only have to send small amounts of data over the network 1:26 when transferring images. 1:29 To make all this magic happen, Docker uses three major components. 1:31 The Docker daemon, which is a process running on your host OS. 1:35 Docker registries, 1:39 which are servers daemons connect to in order to retrieve images they need. 1:41 And the Docker client, which issues commands to the Docker daemon. 1:45 The Docker daemon coordinates running containers, packaging images and 1:50 transferring images to and from registries. 1:54 The Docker command line interface or client is what you see. 1:56 The client is where you run commands on the host machine. 2:00 To spin up new Docker containers, build Docker files into images, 2:03 monitor running containers and many other tasks. 2:07 Docker registries store Docker images. 2:10 We talked about Docker hub earlier which is the public registry anyone can use. 2:13 The Docker tools are configured to talk to Docker hub by default. 2:18 But that's just one of the available registries. 2:22 Docker cloud is another one. 2:24 And you can run a private registry on your company's own servers if you want. 2:26 If you run a Docker pull command using the Docker client, 2:30 the Docker daemon will connect to a Docker registry, retrieve an image, and 2:33 store it on the Docker host machine. 2:38 When you use the Docker run command, 2:40 the Docker daemon launches a copy of a locally stored image as a new container. 2:42 You can even run your own private registry within your organization. 2:47 Which allows you to manage your company's images without pushing them to the public 2:50 Docker registry. 2:54
You need to sign up for Treehouse in order to download course files.Sign up