0

LXC/LXD offers a virtual machines like openVZ but removes the overhead of having custom kernel installation on GUEST systems.

What will be overhead on the GUEST operating system for running application server like JETTY/TOMCAT in a LXC container VS running the the same application server directly on the GUEST operating system ?

First one I noticed is the size of the container itself which is around 300 MB with tomcat server installed and tomcat server itself was only 10 MB.

Initial findings are not comprehensive either

Community
  • 1
  • 1
forum.test17
  • 2,119
  • 6
  • 30
  • 62

1 Answers1

0

A container for any software can have a much different size

  • if it is based on Ubuntu, Debian, a Debian light like Bitnami, Alpine or Busybox

  • if you install a software with all the recommended and suggested packages or not, see this excellent article from Dave Beckett's blog

https://www.dajobe.org/blog/2015/04/18/making-debian-docker-images-smaller/

  • if you use tools like docker-slim

https://github.com/docker-slim/docker-slim

or strip-docker-image

https://github.com/mvanholsteijn/strip-docker-image

to reduce the size of the image

  • if you use docker version 1.13, you have tools to reduce the number of layers using docker squash

https://github.com/moby/moby/pull/22641

Some examples,

1) the popular grafana-xxl has a size of 357.3 MB

while the same image using docker-slim has a size of 18.73 MB

https://hub.docker.com/r/k3ck3c/grafana-xxl.slim/

2) netcat

based on Debian (159,3 MB)

based on Alpine (size 7,812 MB)

https://hub.docker.com/r/k3ck3c/netcat_alpine/

(and about 2 or 3 MB based on Busybox)

user2915097
  • 30,758
  • 6
  • 57
  • 59