Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Andrey Vagin <avagin@openvz.org>
Libcontainer: joining forces under one roof
Docker Moscow Meetup 2015
2
Agenda
● History
● Linux Container
● Docker and LXC
● Libcontainer
● Libct
● Questions
3
History
● Parallels Virtuozzo Containers
● Linux-VServer
● OpenVZ
● LXC
● Linux-utils (unshare, nsenter)
● SystemD (syst...
4
Linux Containers
Namespace
Cgroups
● Cgroups limits resources
– Cpu
– Memory
– Blkio
– Freeze
● Namespaces isolates envi...
5
Hierarchy
Docker
LXC
6
Libcontainer
● Avoid external dependencies
● Create a library to joining forces
– Docker, Google, Parallels, RedHat, etc...
7
Hierarchy
Docker
LXC
execdriver
Libcontainer
Linux Kernel
8
API
● Factory
– Create(), Load()
● Process
– Env, capabilities, cwd
● Container
– Namespaces, cgroup
– ID(), Start(), De...
9
Libct
– Libct is a containers management library which provides convenient
API for frontend programs to rule a container...
10
Hierarchy
Docker
LXC
execdriver
Libcontainer
Linux Libct
Linux OpenVZ
Linux Kernel OpenVZ Linux Kernel
11
The current state and future plans
● Implement the new API for Libcontainer (DONE)
● Migrate Docker to use the new API
...
12
Q&A
● https://github.com/docker/libcontainer
● https://github.com/xemul/libct
● Andrey Vagin <avagin@openvz.org>
Thank ...
Upcoming SlideShare
Loading in …5
×

Libcontainer: joining forces under one roof

463 views

Published on

Andrew Vagin

Published in: Software
  • Login to see the comments

  • Be the first to like this

Libcontainer: joining forces under one roof

  1. 1. Andrey Vagin <avagin@openvz.org> Libcontainer: joining forces under one roof Docker Moscow Meetup 2015
  2. 2. 2 Agenda ● History ● Linux Container ● Docker and LXC ● Libcontainer ● Libct ● Questions
  3. 3. 3 History ● Parallels Virtuozzo Containers ● Linux-VServer ● OpenVZ ● LXC ● Linux-utils (unshare, nsenter) ● SystemD (systemd-nspawn) ● Libcontainer (Docker) OpenVZ 2005 LXC 2008 Libcontainer 2014 Virtuozzo 2001 systemdLinux-utils 2009 VServer
  4. 4. 4 Linux Containers Namespace Cgroups ● Cgroups limits resources – Cpu – Memory – Blkio – Freeze ● Namespaces isolates environment – MNT, PID, NET, IPC, USER, UTS
  5. 5. 5 Hierarchy Docker LXC
  6. 6. 6 Libcontainer ● Avoid external dependencies ● Create a library to joining forces – Docker, Google, Parallels, RedHat, etc ● Support other container technologies (OpenVZ, jails, zones) ● Reuse in other projects (not only in Go)
  7. 7. 7 Hierarchy Docker LXC execdriver Libcontainer Linux Kernel
  8. 8. 8 API ● Factory – Create(), Load() ● Process – Env, capabilities, cwd ● Container – Namespaces, cgroup – ID(), Start(), Destroy() – Pause()/Resume() – Stats(), Processes()
  9. 9. 9 Libct – Libct is a containers management library which provides convenient API for frontend programs to rule a container during its whole lifetime ● In C ● Bindings for other languages (Go, Python)
  10. 10. 10 Hierarchy Docker LXC execdriver Libcontainer Linux Libct Linux OpenVZ Linux Kernel OpenVZ Linux Kernel
  11. 11. 11 The current state and future plans ● Implement the new API for Libcontainer (DONE) ● Migrate Docker to use the new API ● Integrate Libct into Libcontainer
  12. 12. 12 Q&A ● https://github.com/docker/libcontainer ● https://github.com/xemul/libct ● Andrey Vagin <avagin@openvz.org> Thank you

×