Do I need Docker?

So I have been using lxd with docker for a couple of days now, and I feel like it’s much simpler to use than docker. I’m considering dropping docker altogether, for lxd. It would simplify a lot of things for me.

The only downside to dropping docker is the size of the ecosystem. However I feel like with modern day tools it’s probably very simple for me to convert some docker images to lxd images.

After having used lxd it provides most of the things I’m looking for. I started out with wanting to run docker on lxd and managed to set this up but now I just feel like it’s unnecessary.

Anyone else here only using lxd or started with docker on lxd and phased docker out?

Docker just seems un-necessary.

1 Like

After testing docker and LXD for our app stack, I wrestled with similar thoughts. In the end, we landed on LXD because we needed an entire app stack with a persistent data (not using an overlay fs). Our use case is hosting WordPress sites with data that changes regularly. When using docker, we could not separate PHP from NGinx and the data directory had to be hosted elsewhere to ensure the data was kept if the site was moved to another server.

That said, I think the use-case matters most here. In my opinion, Docker is good for quickly spinning up non-persistent data applications. LXD, on the other hand, is great when running an entire app stack in a single container (MysQL, NGinx, PHP).

For us, the main drawback of LXD is managing containers at scale. There is no tool (that I know of) to manage a cluster of LXD servers as a logical unit. This is especially important if you want to keep all the container profiles, images, etc in sync with all the LXD servers. In a perfect world, LXD would have a management cluster for managing resource objects (profiles, network configs, etc) and a compute cluster that manages the compute resources.

My $0.02

-Ron

This topic is quite a good question :slight_smile:

I’m in the same kind of question, rather use docker inside LXD so there is an easy way to deliver application ready to use inside an LXD container witch act like the envelop
If containers are moving from one server to another one, application provided by docker are still working , using local FS (inside the container) .

I think docker is great to provide software. You want an NGINX, you want a MySQL , you want a Wordpress… It’s easy to launch one .
You want to upgrade or change de version, same thing, update the image, pop a new one.
I think if you are not using this kind of features provided by docker, then, going full LXD is good.

@rkelleyrtp is right, managing LXD container is quick time consuming when running several LXD HOST with several LXD container.
But the good thing is, you have the software already in your LXD image, you know what you have built and the way you wanted. It’s not as flexible as docker regarding the software I think, but still a good option depending your needs.

I found more trendy to pop a docker container NGINX than using “apt install nginx”
But once again I think it’s quite difficult nowadays to make a good choice. Here are the options available to each person that want a new platform that work at scale :

1- Pure LXD
Build your containers, include the software you need and go production

PRO: easy to setup, easy to maintain when you have one node, no big learning curve , sounds more like “déja vu”
CON: does not scale out , it’s possible, but not out of the box. No orchestration tools, no web ui to help you managing your containers

2- LXD + Docker
Build and ship your software with something you know, something you trust .

PRO: one box, multiple software , you get the benefice of launching docker containers with software already ready or as you define it. Easy to build, easy to maintain , small learning curve too
CON: more layer of virtualisation , maybe less performance. Integration with docker is not the best from my small experience

3- Docker with Kubernetes / Rancher
Going full docker, forget about LXD

PRO: orchestration , integration and automation too (built-in) are here, you focus on software delivery
CONS: big learning curve, more suitable for big infrastructure , more complex

4- Going with something in between OpenNebula
OpenNebula, like Proxmox are moving more and more to LXD containers.
Not sure if they are relevant in this context , but it’s still an option to build a plateforme

For my I found it very challenging to pick one solution or the other and it get even more complicated when you wanna think about :

  • Storage (yes, that something important . Better if you can have it distributed… but how… )
  • Openstack vs Vmware vs Barre metal (Hello MAAS)
  • Network , what would give us the best (bridge, Openvswitch , etc…)

Hope it gives your another point of view .
In your case, if you feel it’s not necessary , drop docker, stay full LXD . You might have more container to manage but less check about docker container to do.

Cheers,

2 Likes

Hey Benoit,

All very good points indeed. Another point to add is application/app-stack monitoring. With LXD, we use monit to monitor the app stack and restart apps if needed (i.e. PHP-FPM crash). How does docker handle an app crash - especially if the docker container has multiple apps?

-Ron

1 Like

Juju can do orchestration with LXD.

I find it easier to use directly LXD containers instead of Docker in LXD containers.

1 Like

Docker has restart policy built in so it will monitor the process and restart automatically if the process inside fails. Docker handles multiple application node by using things like compose, rancher has their own compose too.

One thing regarding application containers. Yes it’s easy to spin up preconfigured containers but if you need to customize it now you’re back to being like lxd, writing the script to customize the container to what you want. Another thing is for spinning up applications easily, I find alpine Linux to be very simple. For me to spin up Redis or Mysql or postgresql it’s just a matter of spinning up an alpine container doing apk add the lib I want and start. With docker config it’s a bit of a pain when you wanna configure other people’s application because there is this concept of entry points etc… it’s docker dsl mixed in with Linux dsl. Where in lxd it’s just pure Linux, get the container working using raw Linux command then save it as an image and your done. It’s much simpler.

2 Likes

Agreed, I never really understood Juju before learning lxd but now I understand juju is like Rancher it has some similar features.

1 Like