slideshow: https://www.slideshare.net/ssuser9b325a/docker-101-144718472
This is an introduction to docker in Vietnamese language
In this document
- Introduction to docker
- Docker network
- Demo scenario
Slide show:
https://www.slideshare.net/ssuser9b325a/docker-101-144718472
Introduction to Docker presented by MANAOUIL Karim at the Shellmates's Hack.INI event. The teams deployed were assisted to deploy a Python Flask application behind an Nginx load balancer.
Learn, Collaborate & Dockerize. Docker is an open platform that helps you build, ship and run applications anytime and anywhere.
Join Docker Jaipur:
Docker Page: events.docker.com/jaipur
Telegram Group: t.me/dockerjaipur
Twitter: @JaipurDocker
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Docker 101 is a series of workshops that aims to help developers (or interested people) to get started with docker.
The workshop 101 is were the audience has the first contact with docker, from installation to manage multiple containers.
- Installing docker
- managing images (docker rmi, docker pull)
- basic commands (docker info, docker ps, docker images, docker run, docker commit, docker inspect, docker exec, docker diff, docker stop, docker start)
- Docker registry
- container life cycle (running, paused, stopped, restarted)
- Dockerfile
slideshow: https://www.slideshare.net/ssuser9b325a/docker-101-144718472
This is an introduction to docker in Vietnamese language
In this document
- Introduction to docker
- Docker network
- Demo scenario
Slide show:
https://www.slideshare.net/ssuser9b325a/docker-101-144718472
Introduction to Docker presented by MANAOUIL Karim at the Shellmates's Hack.INI event. The teams deployed were assisted to deploy a Python Flask application behind an Nginx load balancer.
Learn, Collaborate & Dockerize. Docker is an open platform that helps you build, ship and run applications anytime and anywhere.
Join Docker Jaipur:
Docker Page: events.docker.com/jaipur
Telegram Group: t.me/dockerjaipur
Twitter: @JaipurDocker
Presented Docker in 15 minutes with two of my classmates at school.
Presentation covering topics:
Virtualization
Virtual Machines
Container Technology (Docker)
Docker Compose
Docker Swarm
The demo can be found at:
https://github.com/DanishKhakwani/SimpleDockerDemo
Docker 101 is a series of workshops that aims to help developers (or interested people) to get started with docker.
The workshop 101 is were the audience has the first contact with docker, from installation to manage multiple containers.
- Installing docker
- managing images (docker rmi, docker pull)
- basic commands (docker info, docker ps, docker images, docker run, docker commit, docker inspect, docker exec, docker diff, docker stop, docker start)
- Docker registry
- container life cycle (running, paused, stopped, restarted)
- Dockerfile
Docker is the world's leading software containerization platform.
This is a comprehensive introduction to Docker, suitable for delivering in introductory meetups to an audience who does not know about docker.
In case you want to deliver this presentation somewhere, kindly drop me a mail at aditya.konarde@gmail.com
You can contact me at:
Connect with me onLinkedIN: https://www.linkedin.com/in/adityakonarde
Add me on Facebook: https://www.facebook.com/Aditya.Konarde
Tweet to me @aditya_konarde
Docker Birthday #3 - Intro to Docker SlidesDocker, Inc.
High level overview of Docker + Birthday #3 overview (app and challenge portion)!
Learn more about Docker Birthday #3 celebrations here: https://www.docker.com/community/docker-birthday-3
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...Simplilearn
This presentation on Docker will help you understand DevOps tools, why Docker is needed, Docker vs Virtual Machine, what is Docker, how does a Docker work and components of Docker. Docker is a tool which is used to automate the deployment of the application in lightweight containers so that applications can work efficiently in different environments. A container is a software package that consists of all the dependencies required to run an application. Until now we have been running applications on virtual machines. Every virtual machine used to be the base of our application but now with the advent of Docker and containerization technologies, each application is run in a container like logical space. Now, let us get started and learn what exactly is Docker.
Below topics are explained in this Docker presentation:
1. DevOps and its tools
2. What is Docker?
3. How does Docker work?
4. What are the components of Docker?
Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit for the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at: https://www.simplilearn.com/
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Edureka!
( ** DevOps Training: https://www.edureka.co/devops ** )
This Docker Explained PPT will explain to you the fundamentals of Docker with a hands-on. Below are the topics covered in the PPT:
Problems Before Docker
Virtualization vs Containerization
What is Docker?
How does Docker work?
Docker Components
Docker Architecture
Docker Compose & Docker Swarm
Hands-On
Docker is the world's leading software containerization platform.
This is a comprehensive introduction to Docker, suitable for delivering in introductory meetups to an audience who does not know about docker.
In case you want to deliver this presentation somewhere, kindly drop me a mail at aditya.konarde@gmail.com
You can contact me at:
Connect with me onLinkedIN: https://www.linkedin.com/in/adityakonarde
Add me on Facebook: https://www.facebook.com/Aditya.Konarde
Tweet to me @aditya_konarde
Docker Birthday #3 - Intro to Docker SlidesDocker, Inc.
High level overview of Docker + Birthday #3 overview (app and challenge portion)!
Learn more about Docker Birthday #3 celebrations here: https://www.docker.com/community/docker-birthday-3
Docker is the world’s leading software container platform. Developers use Docker to eliminate “works on my machine” problems when collaborating on code with co-workers. Operators use Docker to run and manage apps side-by-side in isolated containers to get better compute density. Enterprises use Docker to build agile software delivery pipelines to ship new features faster, more securely and with confidence for both Linux and Windows Server apps.
What Is Docker? | What Is Docker And How It Works? | Docker Tutorial For Begi...Simplilearn
This presentation on Docker will help you understand DevOps tools, why Docker is needed, Docker vs Virtual Machine, what is Docker, how does a Docker work and components of Docker. Docker is a tool which is used to automate the deployment of the application in lightweight containers so that applications can work efficiently in different environments. A container is a software package that consists of all the dependencies required to run an application. Until now we have been running applications on virtual machines. Every virtual machine used to be the base of our application but now with the advent of Docker and containerization technologies, each application is run in a container like logical space. Now, let us get started and learn what exactly is Docker.
Below topics are explained in this Docker presentation:
1. DevOps and its tools
2. What is Docker?
3. How does Docker work?
4. What are the components of Docker?
Simplilearn's DevOps Certification Training Course will prepare you for a career in DevOps, the fast-growing field that bridges the gap between software developers and operations. You’ll become an expert in the principles of continuous development and deployment, automation of configuration management, inter-team collaboration and IT service agility, using modern DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios. DevOps jobs are highly paid and in great demand, so start on your path today.
Why learn DevOps?
Simplilearn’s DevOps training course is designed to help you become a DevOps practitioner and apply the latest in DevOps methodology to automate your software development lifecycle right out of the class. You will master configuration management; continuous integration deployment, delivery and monitoring using DevOps tools such as Git, Docker, Jenkins, Puppet and Nagios in a practical, hands-on and interactive approach. The DevOps training course focuses heavily on the use of Docker containers, a technology that is revolutionizing the way apps are deployed in the cloud today and is a critical skillset to master in the cloud age.
Who should take this course?
DevOps career opportunities are thriving worldwide. DevOps was featured as one of the 11 best jobs in America for 2017, according to CBS News, and data from Payscale.com shows that DevOps Managers earn as much as $122,234 per year, with DevOps engineers making as much as $151,461. DevOps jobs are the third-highest tech role ranked by employer demand on Indeed.com but have the second-highest talent deficit.
1. This DevOps training course will be of benefit for the following professional roles:
2. Software Developers
3. Technical Project Managers
4. Architects
5. Operations Support
6. Deployment engineers
7. IT managers
8. Development managers
Learn more at: https://www.simplilearn.com/
Docker Explained | What Is A Docker Container? | Docker Simplified | Docker T...Edureka!
( ** DevOps Training: https://www.edureka.co/devops ** )
This Docker Explained PPT will explain to you the fundamentals of Docker with a hands-on. Below are the topics covered in the PPT:
Problems Before Docker
Virtualization vs Containerization
What is Docker?
How does Docker work?
Docker Components
Docker Architecture
Docker Compose & Docker Swarm
Hands-On
[DevDay2019] Develop a web application with Kubernetes - By Nguyen Xuan Phong...DevDay.org
Kubernetes is a platform used to automate the management, to scale and to deploy applications in the form of containers. Kubernetes is also called Container orchestration engine.
Giới thiệu các phương pháp và chiến lược đối ứng tải trong Web Application Server.
- WEB Server Scaleout
- Chiến lược Caching
- Tách DB (Horizontal Sharding / Vertical Sharding)
- Linux Kernel Parameters
Nghiên cứu quý 3 của công ty GMO-Z.com VietnamLab.
Chủ đề: Ứng dụng NLP vào việc xác định ý muốn người dùng (Intent Detection) và sửa lỗi chính tả trong tiếng Việt (Spell Correction)
3. Agenda
● Giới thiệu đóc cờ
● Đóc cờ cơ bản
● Đóc cờ cô lập
● Đóc cờ đại chiến Hypervisor
● Đóc cờ CI/CD
● Chốt sổ
3
4. Agenda
● Giới thiệu đóc cờ
● Đóc cờ cơ bản
● Đóc cờ cô lập
● Đóc cờ đại chiến Hypervisor
● Đóc cờ CI/CD
● Chốt sổ
4
5. Giới thiệu Docker
● Open source project
● Giúp đóng gói ứng dụng vào
container để shipping và run
ứng dụng dễ dàng và tiện
lợi hơn, ko phụ thuộc vào
môi trường.
● Mô tả về docker:
Nhẹ và nhanh
5
6. Lịch sử
● Solomon Hykes phát triển Docker tại
Pháp, ở cty dotCloud (cty về PaaS)
● Release Open source 03/2013
● 13/03/2014 nghỉ LXC và chơi
libcontainer
● 05/2016 đã có nhiều cty là main
contributor cho Docker: Cisco, Google,
Huawei, IBM, Microsoft, Red Hat,...
6
13. Docker Engine
● Docker bao gồm:
○ Docker Engine: bộ open source mô phỏng
hoá container kết hợp với tools để build và
run container.
○ Docker Hub: SaaS để quản lý application
stacks.
13
15. Docker Image
15
● Được xây dựng lên từ các
layer
● Docker sử dụng union file
systems để tạo nên docker
image => giúp việc build
image trở nên nhanh hơn.
● Mỗi instruction sẽ tạo ra 1
layer của image.
● Các image được share trên
Docker Hub
17. Container là gì
A container image is a lightweight,
stand-alone, executable package of a
piece of software that includes everything
needed to run it: code, runtime, system
tools, system libraries, settings
17
18. Docker container
● Docker container được tạo ra từ images
● Cách tạo 1 container về cơ bản là dùng
command docker run:
$ sudo docker run -i -t ubuntu /bin/bash
○ CLI tương tác vs Docker daemon qua REST API để
tạo container từ image (sẽ pull image về nếu ko có
trong local)
○ Docker daemon sẽ thiết lập network, mount volume ,
○ Mỗi container được isolate trong các name spaces
riêng biệt.
18
19. Dockerfile
● Là text file chứa các instructions để build ra
một image.
● Cú pháp build image
docker build -t test/myapp .
● Các instruction phổ biến:
○ FROM <image_name>: base image
○ ADD
○ COPY
○ RUN
○ CMD
○ ENTRY_POINT
○ ...
19
20. Ví dụ Dockerfile
FROM ubuntu:latest
MAINTAINER Long Ta "longtv@runsystem.net"
RUN apt-get update
RUN apt-get install -y python python-pip wget
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
ENTRYPOINT ["python"]
CMD ["hello.py"]
20
21.
22. Docker Hub
● Cloud-based registry service để quản lý
image, build image và có link đến Docker
Cloud để deploy container.
● Features:
○ Image repositories
○ Automated Builds
○ Webhooks
○ Organizations
○ Integration with Github vs Bitbucket
22
https://hub.docker.com/
23. Docker Cloud
● Là hosted registry service, hỗ trợ quản lý
infrastructure và quản lý application
lifecycle features để automate deploying
● Features:
○ Manage Builds and Images
○ Manage Infrastructure (Standard Mode)
○ Manage Nodes and Apps (Standard Mode)
○ Manage Swarms (Beta Swarm Mode)
23
24. Docker Cloud
● Đang hỗ trợ các Cloud Provider:
○ AWS
○ Digital Ocean
○ Microsoft Azure
○ SoftLayer
○ Packet
● Hỗ trợ linking đến các version control sau:
○ Github
○ Bitbucket
24
25.
26. Docker orchestration
● From Docker
○ Docker compose
○ Docker machine
○ Docker swarm
● From 3rd party
○ Kubernetes
○
26
28. Docker compose
● Tool để quản lý nhiều container cùng lúc
● Features:
○ Tạo nhiều isolated environments trên cùng
1 host.
○ Bảo tồn các volumes khi start, stop các
containers.
○ Chỉ tạo lại container khi có thay đổi (
docker-compose.yml)
○ Thiết lập các biến môi trường.
28
31. Docker machine
● Tool giúp install docker engine trên virtual host
và quản lý các virtual host thông qua command
docker-machine
● Công năng:
1. Giúp chạy docker trên những hệ điều hành Window
or Mac cũ
2. Chạy docker command remoce tới docker host.
31
34. Tạo virtual host với
Virtualbox
● Command
docker-machine create --driver virtualbox node-01
● Các option cho Virtualbox:
--virtualbox-memory
--virtualbox-cpu-count
--virtualbox-disk-size
--virtualbox-host-dns-resolver
…
● Chọi vào host
eval $(docker-machine env node-01)
34
35. Tạo virtual host của Conoha
1. Export các thông tin để xác thực
export OS_USERNAME=<api_username>
export OS_TENANT_ID=<tenant_id>
export OS_PASSWORD=<api_password>
export OS_AUTH_URL=https://identity.tyo1.conoha.io/v2.0
export OS_REGION_NAME=tyo1
2. Tạo máy ảo
docker-machine create
-d openstack
--openstack-flavor-name g-1gb
--openstack-image-name vmi-ubuntu-16.04-amd64-unified
--openstack-sec-groups "default,gncs-ipv4-all"
--openstack-sec-groups "default,gncs-ipv4-all"
co-01
35
40. Docker swarm scheduling
● Swarm mode deploy sử dụng:
$docker service create --name my_web --replicas 3 nginx
● Swarm deploy service bằng cách scheduling các tasks
○ Task: là slot để đặt container
○ Nếu task tạch thì xóa task đi và tạo ra task mới ( reschedule )
○ Khi một service deploy mà ko có node vào available thì service sẽ rơi
vào trạng thái pending cho đến khi task được thực thi hết (có thể
pending mãi mãi)
● Scheduling strategies: flag --strategy
○ spread(default): dựa trên số lượng containter ( kể cả đã stop)
○ Binpack: hấp diêm thằng node còn available
○ Random: táng bừa
● Deloy mode:
○ replicated: tạo số lượng bản sao
○ global: deploy trên tất cả các node (ví dụ log,...)
40
43. Raft Consensus Algorithm
● Thuật toán đồng thuận để quản lý replicated log,
swarm dùng để quản lý global cluster state.
● Mỗi node sẽ có 3 state: Follower, Candidate,
Leader
● Hỗ trợ:
Leader Election Replicated Log
43
47. Docker Cloud
● Là hosted registry service, hỗ trợ quản lý
infrastructure và quản lý application
lifecycle features để automate deploying
● Features:
○ Manage Builds and Images
○ Manage Infrastructure (Standard Mode)
○ Manage Nodes and Apps (Standard Mode)
○ Manage Swarms (Beta Swarm Mode)
47
48. Docker Cloud
● Đang hỗ trợ các Cloud Provider:
○ AWS
○ Digital Ocean
○ Microsoft Azure
○ SoftLayer
○ Packet
● Hỗ trợ linking đến các version control sau:
○ Github
○ Bitbucket
● Swarm mode (beta)
48
53. Cgroups
● Là feature của Linux Kernel cho phép
limit, theo dõi, quản lý sử dụng resources
của “collection of processes”
● Cgroups giúp quản lý các resources: cpu,
memory, devices, ns … ( còn gọi là sub
system)
53
54. Cgroups
Docker sử dụng cgroups để quản lý resoures cho các
container: CPU, Memory, IO
54
docker run -it --cpus=".5" --memory="300m" ubuntu /bin/bash
50% CPU
300Mb memory and
600Mb Swap
55. Namespaces
● Là feature của Linux kernel, ra đời để hỗ trợ
cho công nghệ container. ( cung cấp isolated
secure environment)
● Từ Linux kernel 2.6.24 Linux hỗ trợ 6 loại
namespace:
55
56. Namespaces
Các process chạy
inside namespace
chỉ tương tác được
vs các process bên
trong namespace đó
và ko thể tương tác
outside cũng như
sang namespace
khác ( container
khác)
56
61. 61
Hypervisor là gì
A hypervisor or virtual machine monitor
(VMM) is computer software, firmware, or
hardware, that creates and runs virtual
machines. A computer on which a hypervisor
runs one or more virtual machines is called a
host machine, and each virtual machine is
called a guest machine.
https://en.wikipedia.org/wiki/Hypervisor
62. Hypervisor?
1. Native(bare metal): Chạy trực tiếp trên hardware của host
machine. Xen, Oracle VM Server for SPARC, Oracle VM
Server for x86, Microsoft Hyper-V and VMware ESX/ESXi.
2. Hosted: Chạy phía trên OS của host machine. VMware
Workstation, VMware Player, VirtualBox, Parallels Desktop
for Mac and QEMU
62
63. Docker có phải VM ko?
63
In computing, a virtual machine (VM) is an emulation of a computer system.
Virtual machines are based on computer architectures and provide
functionality of a physical computer. Their implementations may involve
specialized hardware, software, or a combination.
https://en.wikipedia.org/wiki/Virtual_machine
Docker container khiến ta “cảm giác” như là
đang dùng VM vậy.
- Có thể ssh vào container
- Có thể run các CLI của OS
- Không gian riêng bên trong container
- ...
64. Docker vs Hypervisor
64
Containers are an abstraction at
the app layer that packages code
and dependencies together.
Virtual machines (VMs) are an
abstraction of physical hardware
turning one server into many
servers
65. Docker vs Hypervisor
65
Docker Hypervisor
Ảo hóa OS trở lên Ảo hóa phần cứng (hardware) trở lên
Nhẹ + start nhanh Nặng + start (boot) chậm
Slow provisioning Real-time provisioning and scalability
Native performance Limited performance
Secure kém hơn Secure tốt hơn
Process-level isolation Fully isolated
Sử dụng resources hiệu quả hơn Sử dụng resouces lãng phí
68. Agenda
● Giới thiệu đóc cờ
● Đóc cờ cơ bản
● Đóc cờ cô lập
● Đóc cờ đại chiến Hypervisor
● Đóc cờ CI/CD
● Chốt sổ
68
69. 69
Docker CI/CD
● CI: Continuous Integration là development practice yêu cầu
các developers phải tích hợp(integrate) code vào shared
repository vài lần 1 ngày: mỗi thay đổi đều được test =
automated build để phát hiện sai sót.
● CD-Continuous Delivery: ốp tất cả những j thay
đổi (new feature, hotfix,...) vào phiên bản production (ko
deploy luôn)
● CD-Continuous Deployment: bước tiếp theo
của Continuous Delivery là deploy luôn vào production
76. CI/CD giúp gì?
● Speed: tăng tốc phát triển sản phẩm
● Quality: tăng chất lượng cho sảm phẩm
● Capacity and Scale: cho phép big team
cùng theo 1 dự án.
● Cost: giảm cost meeting và management
● Focus: team member ko bị lẫn lộn nhiều
task cùng lúc
● Clarity: giảm stress
76
77. Tôi đã gói xôi như thế nào
● Thử thách với những project đã làm
1. Jarvis: ko dùng Docker Orchestration
○ Chỉ dùng docker bình thường.
2. CallDB:
○ dùng cả 3 công cụ Orchestration
○ Dùng CI/CD: bitbucket, DockerHub, Jenkins.
77
83. Agenda
● Giới thiệu đóc cờ
● Đóc cờ cơ bản
● Đóc cờ cô lập
● Đóc cờ đại chiến Hypervisor
● Đóc cờ CI/CD
● Chốt sổ
83
84. 84
Chốt hạ
● Docker hay:
➽ Thống nhất môi trường
➽ Deploy nhẹ nhàng, Scale đơn giản, hiệu quả
➽ Càng ngày càng có nhiều Infrastructure service
(IaaS, PaaS) lớn hỗ trợ container
➽ Cộng đồng lớn
➽ Cách nhìn khác về service infrastructure
➽ Phù hợp với kiến trúc Microservice đang hưng thịnh
● Docker dở:
➽ Việc viết Dockerfile đối với Infrastructure phức tạp
rất phức tạp.
➽ Chuyển giao từ VM sang Container cần phải tìm
hiểu rất nhiều để ứng dụng trên production