lxc - What is the impact of using multiple Base Images in Docker? -


i understand docker containers portable between docker hosts, confused relationship base image , host.

from documentation on images, appears have heavier footprint (akin multiple vms) on host machine if had variety of base images running. assumption correct?

  • good: many containers sharing single base image.
  • bad: many containers running separate/unique base images.

i'm sure lot of confusion comes lack of knowledge of lxc.

enter image description here

i confused relationship base image , host.

the relation between container , host use same kernel. programs running in docker can't see host filesystem @ all, own filesystem.

it appears have heavier footprint (akin multiple vms) on host machine if had variety of base images running. assumption correct?

no. ubuntu base image 150mb. you'd hard-pressed use of programs , libraries. need small subset particular purpose. in fact, if container running memcache, copy 3 or 4 libraries needs, , 1mb. there's no need shell, etc. unused files sit there patiently on disk, ignored. not loaded memory, nor copied around on disk.

good: many containers sharing single base image. bad: many containers running separate/unique base images.

no. using multiple images use tiny bit of ram. (obviously, multiple containers take more disk space, disk cheap, we'll ignore that). i'd argue it's "ok" instead of "bad".

example: start 1 ubuntu container memcached , centos container tomcat. if both running ubuntu, share ram things libc. because don't share files, each base image must load it's own copy of libc. we've seen, we're talking 150mb of files, , you're using few percent of that. each image wastes few mb of ram.

(hint: @ process in ps. that's how ram it's using, including files it's image.)


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -