SlideShare ist ein Scribd-Unternehmen logo
1 von 26
Downloaden Sie, um offline zu lesen
Build, Ship, and Run Any App, Anywhere
COEP FOSSMeet'18
Rahulkrishnan R A
About Me
» Consultant @ Capgemini
» Debian Contributor
» Gopher
» Organizer of kubernetes Meetup, Chennai
Docker 101
LinkedIn linkedin.com/in/rahulkrishnanra/
Github https://github.com/rahulkrishnanfs
Twitter https://twitter.com/rahulkrishnanra
3What is namespace?
» Feature of the Linux kernel that partitions kernel resources
» Limits what you can see
» Namespaces are the fundamental aspect of containers on Linux
4
Types of namespace
o pid (processes)
o net (network stack)
o mnt (mount points, filesystems)
o uts (hostname)
o ipc (System V IPC)
o user (UIDs)
o cgroups
5
What are they ?
root@ip-172-31-43-99:/# ls -la /proc/4015/ns/
total 0
lrwxrwxrwx 1 cgroup -> cgroup:[4026531835]
lrwxrwxrwx 1 ipc -> ipc:[4026531839]
lrwxrwxrwx 1 mnt -> mnt:[4026531840]
lrwxrwxrwx 1 net -> net:[4026531993]
lrwxrwxrwx 1 pid -> pid:[4026531836]
lrwxrwxrwx 1 user -> user:[4026531837]
lrwxrwxrwx 1 uts -> uts:[4026531838]
6
PID namespace
» Processes within a PID namespace only see processes in the same PID
namespace
» Each PID has its own numbering
» Namespace will be killed if PID one goes away
» Behavior like the “init” process
» PID namespace can be nested, up to 32 nesting levels
7
1
2 3
4, 1
5, 2 6, 3
Child PID namespace
parent PID namespace
Network Namespace
» Logical copy of the network stack
It has its own:
 routes
 firewall rules
 network devices
 IP address
» It helps to separate application/process networking
» You can move network interface across netns
» Newly created network namespace includes only the loopback device
Child net namespace
Child net namespace
Global net namespace
InterfaceInterface
routing
NetworkInterface
Mount namespace
» Processes can have their own rootfs
» Mounts can be totally private or shared
» In the new mount namespace, all previous mounts will be visible
» Mounts/unmounts in the global namespace are visible in that
namespace
UTS namespace
» Appears to have different host and domain names to different
processes.
» UTS namespace provides a way to get information about the system
with commands like uname or hostname
» Simple one to implement
UTS namespace Implementation
func main() {
cmd := exec.Command("/bin/sh")
cmd.SysProcAttr = &syscall.SysProcAttr{
Cloneflags: syscall.CLONE_NEWUTS,
}
syscall.Sethostname([]byte("inner"))
if err := cmd.Run(); err != nil {
panic(err)
}
}
IPC namespace
» Private set of IPC objects inside namespace
eg: shm
User namespace
» Allows to map UID/GID
» Avoid extra configuration in containers
» Security improvement
Container runtime - Docker
How containers looks like?
ContainersVirtual Machines
Interest on Docker – Google trends
https://trends.google.co.in/trends/explore?date=today%205-y&q=docker
Docker Engine
Docker Engine is a client-server application with these major components:
» A REST API which specifies interfaces that programs can use to talk to the daemon and instruct
it what to do
» A command line interface (CLI) client ( the docker command)
» A server which is a type of long-running program called a daemon process (the dockerd
command)
Docker architecture
How docker access the linux kernel?
Docker Images vs Containers
Images
» Lightweight, stand-alone, executable package
» Includes everything needed to run a piece of software, including the
code, a runtime, libraries, environment variables, and config files.
Container
» Runtime instance of an image—what the image becomes in memory
when actually executed.
Docker Image
Sharing the docker image
“
Demo
24
“
Questions
25
“
Thanks !!!
Follow me @rahulkrishnanra
26
😉

Weitere ähnliche Inhalte

Was ist angesagt?

Redis clustering
Redis clusteringRedis clustering
Redis clusteringRavi Yasas
 
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングCoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングYuji ODA
 
Docker 基本概念與指令操作
Docker  基本概念與指令操作Docker  基本概念與指令操作
Docker 基本概念與指令操作NUTC, imac
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...NLJUG
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台NUTC, imac
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloudNUTC, imac
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxJazz Yao-Tsung Wang
 
Everyone Loves a Sausage
Everyone Loves a SausageEveryone Loves a Sausage
Everyone Loves a SausageNick Jones
 
Instructions
InstructionsInstructions
Instructionsds5ysm
 
Fixed in drizzle
Fixed in drizzleFixed in drizzle
Fixed in drizzleHenrik Ingo
 
Find the Hacker
Find the HackerFind the Hacker
Find the HackerSysdig
 
Ns 3 installation procedure
Ns 3 installation procedureNs 3 installation procedure
Ns 3 installation procedureVinayak Antin
 
Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015luisamariethm
 
About linux japanese
About linux japaneseAbout linux japanese
About linux japaneseShota Ito
 
2013 PyCon SG - Building your cloud infrastructure with Python
2013 PyCon SG - Building your cloud infrastructure with Python2013 PyCon SG - Building your cloud infrastructure with Python
2013 PyCon SG - Building your cloud infrastructure with PythonGeorge Goh
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)Mario Cho
 
Open stack 4day
Open stack 4dayOpen stack 4day
Open stack 4dayMario Cho
 

Was ist angesagt? (20)

Redis clustering
Redis clusteringRedis clustering
Redis clustering
 
CoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリングCoreOSによるDockerコンテナのクラスタリング
CoreOSによるDockerコンテナのクラスタリング
 
Docker 基本概念與指令操作
Docker  基本概念與指令操作Docker  基本概念與指令操作
Docker 基本概念與指令操作
 
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
Gebruik dezelfde Docker container voor Java applicaties tijdens ontwikkelen e...
 
使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台使用 CLI 管理 OpenStack 平台
使用 CLI 管理 OpenStack 平台
 
Build your own private openstack cloud
Build your own private openstack cloudBuild your own private openstack cloud
Build your own private openstack cloud
 
Introduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in LinuxIntroduction to Diskless Remote Boot in Linux
Introduction to Diskless Remote Boot in Linux
 
Everyone Loves a Sausage
Everyone Loves a SausageEveryone Loves a Sausage
Everyone Loves a Sausage
 
Slider2
Slider2Slider2
Slider2
 
testing-nfs
testing-nfstesting-nfs
testing-nfs
 
Instructions
InstructionsInstructions
Instructions
 
Fixed in drizzle
Fixed in drizzleFixed in drizzle
Fixed in drizzle
 
Find the Hacker
Find the HackerFind the Hacker
Find the Hacker
 
CoreOS
CoreOSCoreOS
CoreOS
 
Ns 3 installation procedure
Ns 3 installation procedureNs 3 installation procedure
Ns 3 installation procedure
 
Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015Microsoft Docker Meetup - Tutum Spring 2015
Microsoft Docker Meetup - Tutum Spring 2015
 
About linux japanese
About linux japaneseAbout linux japanese
About linux japanese
 
2013 PyCon SG - Building your cloud infrastructure with Python
2013 PyCon SG - Building your cloud infrastructure with Python2013 PyCon SG - Building your cloud infrastructure with Python
2013 PyCon SG - Building your cloud infrastructure with Python
 
An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)An Introduce of OPNFV (Open Platform for NFV)
An Introduce of OPNFV (Open Platform for NFV)
 
Open stack 4day
Open stack 4dayOpen stack 4day
Open stack 4day
 

Ähnlich wie Build, Ship, and Run Any App, Anywhere using Docker

Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersKernel TLV
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security宇 傅
 
Hacking Docker the Easy way
Hacking Docker the Easy wayHacking Docker the Easy way
Hacking Docker the Easy wayBorg Han
 
Security on a Container Platform
Security on a Container PlatformSecurity on a Container Platform
Security on a Container PlatformAll Things Open
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformAll Things Open
 
The building blocks of docker.
The building blocks of docker.The building blocks of docker.
The building blocks of docker.Chafik Belhaoues
 
lxc-namespace.pdf
lxc-namespace.pdflxc-namespace.pdf
lxc-namespace.pdf-
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Neeraj Shrimali
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance AnalysisBrendan Gregg
 
Container Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixContainer Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixDocker, Inc.
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboardsDenis Ristic
 
Secure development on Kubernetes by Andreas Falk
Secure development on Kubernetes by Andreas FalkSecure development on Kubernetes by Andreas Falk
Secure development on Kubernetes by Andreas FalkSBA Research
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization WSO2
 
Evoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationEvoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationImesh Gunaratne
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and HowSneha Inguva
 
Docker London: Container Security
Docker London: Container SecurityDocker London: Container Security
Docker London: Container SecurityPhil Estes
 
Resource Management of Docker
Resource Management of DockerResource Management of Docker
Resource Management of DockerSpeedyCloud
 
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Sysdig
 

Ähnlich wie Build, Ship, and Run Any App, Anywhere using Docker (20)

Namespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containersNamespaces and cgroups - the basis of Linux containers
Namespaces and cgroups - the basis of Linux containers
 
Docker Container: isolation and security
Docker Container: isolation and securityDocker Container: isolation and security
Docker Container: isolation and security
 
Hacking Docker the Easy way
Hacking Docker the Easy wayHacking Docker the Easy way
Hacking Docker the Easy way
 
LSA2 - 02 Namespaces
LSA2 - 02  NamespacesLSA2 - 02  Namespaces
LSA2 - 02 Namespaces
 
Security on a Container Platform
Security on a Container PlatformSecurity on a Container Platform
Security on a Container Platform
 
Securing Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container PlatformSecuring Applications and Pipelines on a Container Platform
Securing Applications and Pipelines on a Container Platform
 
The building blocks of docker.
The building blocks of docker.The building blocks of docker.
The building blocks of docker.
 
lxc-namespace.pdf
lxc-namespace.pdflxc-namespace.pdf
lxc-namespace.pdf
 
Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup. Linux container, namespaces & CGroup.
Linux container, namespaces & CGroup.
 
Container Performance Analysis
Container Performance AnalysisContainer Performance Analysis
Container Performance Analysis
 
Container Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, NetflixContainer Performance Analysis Brendan Gregg, Netflix
Container Performance Analysis Brendan Gregg, Netflix
 
17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards17 Linux Basics #burningkeyboards
17 Linux Basics #burningkeyboards
 
Secure development on Kubernetes by Andreas Falk
Secure development on Kubernetes by Andreas FalkSecure development on Kubernetes by Andreas Falk
Secure development on Kubernetes by Andreas Falk
 
Evolution of Linux Containerization
Evolution of Linux Containerization Evolution of Linux Containerization
Evolution of Linux Containerization
 
Evoluation of Linux Container Virtualization
Evoluation of Linux Container VirtualizationEvoluation of Linux Container Virtualization
Evoluation of Linux Container Virtualization
 
LXC
LXCLXC
LXC
 
Containers: The What, Why, and How
Containers: The What, Why, and HowContainers: The What, Why, and How
Containers: The What, Why, and How
 
Docker London: Container Security
Docker London: Container SecurityDocker London: Container Security
Docker London: Container Security
 
Resource Management of Docker
Resource Management of DockerResource Management of Docker
Resource Management of Docker
 
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...Lions, Tigers and Deers: What building zoos can teach us about securing micro...
Lions, Tigers and Deers: What building zoos can teach us about securing micro...
 

Kürzlich hochgeladen

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Kürzlich hochgeladen (20)

Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Build, Ship, and Run Any App, Anywhere using Docker

  • 1. Build, Ship, and Run Any App, Anywhere COEP FOSSMeet'18 Rahulkrishnan R A
  • 2. About Me » Consultant @ Capgemini » Debian Contributor » Gopher » Organizer of kubernetes Meetup, Chennai Docker 101 LinkedIn linkedin.com/in/rahulkrishnanra/ Github https://github.com/rahulkrishnanfs Twitter https://twitter.com/rahulkrishnanra
  • 3. 3What is namespace? » Feature of the Linux kernel that partitions kernel resources » Limits what you can see » Namespaces are the fundamental aspect of containers on Linux
  • 4. 4 Types of namespace o pid (processes) o net (network stack) o mnt (mount points, filesystems) o uts (hostname) o ipc (System V IPC) o user (UIDs) o cgroups
  • 5. 5 What are they ? root@ip-172-31-43-99:/# ls -la /proc/4015/ns/ total 0 lrwxrwxrwx 1 cgroup -> cgroup:[4026531835] lrwxrwxrwx 1 ipc -> ipc:[4026531839] lrwxrwxrwx 1 mnt -> mnt:[4026531840] lrwxrwxrwx 1 net -> net:[4026531993] lrwxrwxrwx 1 pid -> pid:[4026531836] lrwxrwxrwx 1 user -> user:[4026531837] lrwxrwxrwx 1 uts -> uts:[4026531838]
  • 6. 6 PID namespace » Processes within a PID namespace only see processes in the same PID namespace » Each PID has its own numbering » Namespace will be killed if PID one goes away » Behavior like the “init” process » PID namespace can be nested, up to 32 nesting levels
  • 7. 7 1 2 3 4, 1 5, 2 6, 3 Child PID namespace parent PID namespace
  • 8. Network Namespace » Logical copy of the network stack It has its own:  routes  firewall rules  network devices  IP address » It helps to separate application/process networking » You can move network interface across netns » Newly created network namespace includes only the loopback device
  • 9. Child net namespace Child net namespace Global net namespace InterfaceInterface routing NetworkInterface
  • 10. Mount namespace » Processes can have their own rootfs » Mounts can be totally private or shared » In the new mount namespace, all previous mounts will be visible » Mounts/unmounts in the global namespace are visible in that namespace
  • 11. UTS namespace » Appears to have different host and domain names to different processes. » UTS namespace provides a way to get information about the system with commands like uname or hostname » Simple one to implement
  • 12. UTS namespace Implementation func main() { cmd := exec.Command("/bin/sh") cmd.SysProcAttr = &syscall.SysProcAttr{ Cloneflags: syscall.CLONE_NEWUTS, } syscall.Sethostname([]byte("inner")) if err := cmd.Run(); err != nil { panic(err) } }
  • 13. IPC namespace » Private set of IPC objects inside namespace eg: shm
  • 14. User namespace » Allows to map UID/GID » Avoid extra configuration in containers » Security improvement
  • 16. How containers looks like? ContainersVirtual Machines
  • 17. Interest on Docker – Google trends https://trends.google.co.in/trends/explore?date=today%205-y&q=docker
  • 18. Docker Engine Docker Engine is a client-server application with these major components: » A REST API which specifies interfaces that programs can use to talk to the daemon and instruct it what to do » A command line interface (CLI) client ( the docker command) » A server which is a type of long-running program called a daemon process (the dockerd command)
  • 20. How docker access the linux kernel?
  • 21. Docker Images vs Containers Images » Lightweight, stand-alone, executable package » Includes everything needed to run a piece of software, including the code, a runtime, libraries, environment variables, and config files. Container » Runtime instance of an image—what the image becomes in memory when actually executed.
  • 26. “ Thanks !!! Follow me @rahulkrishnanra 26 😉