+ All Categories
Home > Technology > Lopug docker end_of_distro

Lopug docker end_of_distro

Date post: 06-Aug-2015
Category:
Upload: chris-swan
View: 26 times
Download: 0 times
Share this document with a friend
27
copyright 2014 1 Docker and the end of the distro Chris Swan, CTO @cpswan Cloud native networking
Transcript

copyright 2014 1

Docker and the end of the distro

Chris Swan, CTO @cpswan

Cloud native networking

copyright 2014 2

TL;DR A great part of the Docker success story has been reuse of existing distros This is a bad thing, and we can do better We’ve already done something for what we run Docker on. Next up – what we run in Docker

copyright 2014

Docker runs just fine in/on

3

copyright 2014

So quite often host OS == container OS

4

Host

Container Container Container

copyright 2014

We don’t need a full OS to run Docker

5

copyright 2014

So now we have host OS < container OS

6

Host

Container Container Container

copyright 2014

What we run Docker on != what we run in Docker

7

copyright 2014

So we can’t easily get this

8

Host

Container Container Container

copyright 2014

But we don’t need a full OS inside containers

9

copyright 2014

But we might aspire to this

10

Host

Container Container Container

copyright 2014 11

The manifest problem

copyright 2014

A typical Dockerfile

12

copyright 2014

Each active line creates a layer

13

Base OS Sources

Update repos Install nginx

Mod nginx.conf Mod index.html

copyright 2014

An image binds layers together

14

Base OS Sources

Update repos Install nginx

Mod nginx.conf Mod index.html

copyright 2014

Nginx example

The image is the unit of deployment

15

copyright 2014

Nginx example

What version of nginx is that?

16

copyright 2014

Nginx example

What version of OpenSSL installed?

17

?

copyright 2014

Nginx example

and which bash?

18

?

copyright 2014

Problem 1 – non determinism

Whilst we want this to be cached in the short term: apt-get install nginx We perhaps don’t want it cached in the long term

What are those durations?

19

copyright 2014

Dockerfile Jenga

20

CC Image credit: Ed Garcia https://www.flickr.com/photos/egarc2/2432270195

copyright 2014

2 – the manifest problem

When I run apt-get install nginx

I don’t know which version of nginx I just got

Should I? nginx –v > some_log.txt

Or maybe? apt-cache policy nginx > some_log.txt

21

copyright 2014

Recommendation 2 (of 6)

22

Get specific:

But… might still pull in a bunch of point in time dependencies

Check out http://container-solutions.com/2014/11/6-dockerfile-tips-official-images/ (http://is.gd/sixtips)

copyright 2014

Solomon promises to fix things

23

copyright 2014

FROM scratch

24

copyright 2014

There is another way

25

copyright 2014 26

TL;DR A great part of the Docker success story has been reuse of existing distros This is a bad thing, and we can do better We’ve already done something for what we run Docker on. Next up – what we run in Docker

copyright 2014 27

Chicago, US [email protected] +1 888 444 3962

Questions?


Recommended