0% found this document useful (0 votes)
3 views

01.Container and Docker

The document provides an overview of containers, particularly focusing on Docker, which is a platform for developing, shipping, and running applications in containers. It highlights the benefits of using containers, such as portability, efficient resource usage, and separation of development and operations. Additionally, it covers Docker's architecture, workflow, and basic concepts, emphasizing the advantages of containers over traditional virtual machines.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

01.Container and Docker

The document provides an overview of containers, particularly focusing on Docker, which is a platform for developing, shipping, and running applications in containers. It highlights the benefits of using containers, such as portability, efficient resource usage, and separation of development and operations. Additionally, it covers Docker's architecture, workflow, and basic concepts, emphasizing the advantages of containers over traditional virtual machines.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

pg.

1
Table of Contents
1. Why use containers ? .................................................................................................4
2. Docker: A shipping container for code ........................................................................6
3. Benefits of using containers .......................................................................................7
4. Virtual machines versus containers ............................................................................8
5. Dev versus Ops ...........................................................................................................9
6. Docker mission ......................................................................................................... 11
7. Docker adoption....................................................................................................... 12
8. Docker basic concepts .............................................................................................. 13
9. Docker architecture .................................................................................................. 14
10. Docker Typical workflow ....................................................................................... 15
11. Docker shared and layered file systems technology .............................................. 16

2
What are containers?

LXC (LinuX Containers) is a OS-level virtualization technology


that allows creation and running of multiple isolated Linux virtual
environments (VE) on a single control host. ...

Docker is developed in the Go language and utilizes LXC,


cgroups, and the Linux kernel itself.

3
1. Why use containers ?

So, why use containers?

In short, containers are small, agile, and portable, so they can help you
deploy and manage applications quickly, and scale up or down in
response to demand.

In the container deployment model, applications are not tied to specific


host computers, so they can be distributed across available resources in
a more efficient way.

This kind of environment is ideal for deploying microservices.

4
The challenge is this: you have all this stuff you need to deploy, and
there are so many ways to deploy it.

5
2. Docker: A shipping container for code

Docker answers this challenge.

Now we are wrapping all that junk up inside the container together The
runtime versions … with the application

We can now ship this as a unit through our environments very


efficiently Using our CI / CD pipelines

We don’t need to patch the runtime along the way …

6
3. Benefits of using containers

The benefits to using containers are numerous, particularly with Docker:

• Docker images can run on many different platforms.


• If you can run an application on a Linux kernel, then you can package it in Docker, and then run it
in different environments without having to change it.
• Containers keep the concerns of development and operations separate. What happens inside the
container doesn’t have much impact on operations that run outside the container.
• So, applications can do their own thing, while the process of running the container can be
standardized.
• Containers are easy to manage – you can quickly create and delete, download, share, start and
stop them.
• Containers use hardware resources more efficiently than virtual machines, and are more
lightweight.
• They are more dense than virtual machines. Docker containers can share layers, and support
multi-tenancy.
• Containers should be treated as unchangeable, so that every container created from a single
image will be the same. Container images are versions.
• You should not patch a container, but patch the image when it needs to be updated.
• When you don’t need it anymore, a container can be easily deleted or replaced.

In summary: So, why use containers? In short, containers are small, agile, and portable, so they can
help you deploy and manage applications quickly, and scale up or down in response to demand. In the
container deployment model, applications are not tied to specific host computers, so they can be
distributed across available resources in a more efficient way. This kind of environment is ideal for
deploying microservices.

7
4. Virtual machines versus containers

Containers have a smaller footprint, use less resources.


And we can share our headspace

8
5. Dev versus Ops

9
Container ecosystem

10
6. Docker mission

The Docker Workflow:

Build … the developer in a IaaS world has a bunch of choices


that they have to make and configure

Ship … now we need to get this work that was done in build and
replicate it out in potentially different environments different OS’s

Run … now we need to run and manage it in all of these new


places …. With agility

11
7. Docker adoption

12
8. Docker basic concepts

• A Docker image is a recipe or template for creating Docker containers. It


includes the steps for installing and running the required software, defines what
processes to run when the container is launched, and a variety of other
configuration data.

• A Docker container is created from the instructions provided in the Docker


image. It consists of an operating system, user-added files, and meta-data.

• A Docker registry is a repository of Docker images. The Docker Hub is a


popular example of a social Docker registry.

• A Docker engine manages Docker hosts, can run locally, or in a cloud hosting
service.

• The Docker client is a command-line interface that takes advantage of the


Docker API and communicates with the Docker daemon.

13
9. Docker architecture

Docker uses a client-server model and remote API to create and


manage Docker images and containers.

14
10. Docker Typical workflow

A typical workflow has you create images, pull them from the
repository, build, and run as containers.

15
11. Docker shared and layered file systems technology

• The Docker image is read-only, and references a list of layers that


represent filesystem differences.

• When Docker runs a container from an image, it adds a read-write


layer on top of the image (by using a union file system) in which
the application can run.

• A union file system merges all the files for each image layer
together and presents them as a single directory at the union
mount point.

• Note: Copy-on-write is a similar strategy of sharing and copying, in


which the system processes that need to access the same data,
share the same instance of that data, rather than having their own
copy.

• Since each container has its own thin, writable layer, which stores
all changes, this means that multiple containers can share access
to the same image while maintaining their own data state.
16
Checkpoint questions

1. Containers running on a single machine all share the same


operating system kernel so they start instantly and make more
efficient use of RAM

A. True
B. False

2. ________is a text document that contains all the commands a


user could call on the command line to assemble an image
A. Docker Cloud
B. Docker Kitematic
C. Dockerfile
D. Docker Compose

3. Docker is written in...


A. Oracle
B. Java
C. Go
D. C#

17
Checkpoint answers

1. TRUE

2. C

3. C

18

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy