Containers without OS?

If it’s feasible to run/execute user server side PHP/Javascript scripts without installing OS image in the containers and while both PHP and Nodejs are installed on host?


You are somewhat describing docker (application containers) compared to the system containers (with OS) in LXD.
Having said that, I think you are trying to describe a more fine-grained option with docker. You might be able to perform what you want with a custom docker container image.

I wish I could consider non-docker.

After reading your article on partitioning.

I’m curious what is the use case to host all containers in a partition and could each container quota capped a hard limit to 3GB as opposed to minimum 15GB which pre-allocated during initialising?

You can either get the ZFS filesystem on a partition, or get it to reside in a loopback file. You would select the second option if you do not have an option to dedicate a partition to ZFS. Because with the loopback file, every disk access to ZFS would be translated to a disk access to ext4 (or whichever filesystem is used by your Linux installation).

With hetzner, there is this trick that allows you to repartition the VPS disk so that with the basic package you can keep ZFS happy with direct access and all. Note that ZFS is more than just a mere filesystem, so there is some extra benefit as well.

Hetzner also offers now the option to attach block storage to a VPS. That would be an alternative if you do not want to go into repartitioning. In this case, you will be paying a bit extra for that additional storage.

The 15GB that you mention, is the minimum suggested size by LXD, when you first run lxd init. It is for the total size of ZFS, all containers included. If you want to set size limits to individual containers, then that’s a different setting. Normally you would not put such limits so that each container can use as much space as it is required. You would use a disk space limit per container if you know for certain how much space the container will have, and you have a case to put a hard restriction.

Nice, I understood it all now.