Your experience with Docker in LXC

Martino Rabe

Renowned Member
Jul 24, 2016
18
1
68
45
Hello,

I have a lot of Docker containers that I would like to run together in an LXC container or in a virtual machine under Proxmox.
I would like to create the LXC container using the following command:

Code:
pct create 100 local:vztmpl/ubuntu-24.04-standard_24.04-2_amd64.tar.zst --hostname test --cores 2 --memory 2048 --net0 name=eth0,bridge=vmbr0,firewall=1,ip=dhcp --rootfs=zdisk:40 --features nesting=1 --unprivileged 1

What is your experience with running about 10 Docker systems via Portainer (for better management) in an LXC container?

Proxmox -> LXC -> Docker

Does that make sense or does it cause a lot of problems?
 
From proxmox wiki:
"If you want to run application containers, for example, Docker images, it is recommended that you run them inside a Proxmox QEMU VM. This will give you all the advantages of application containerization, while also providing the benefits that VMs offer, such as strong isolation from the host and the ability to live-migrate, which otherwise isn’t possible with containers."

https://pve.proxmox.com/wiki/Linux_Container

Since lxc and docker uses the same stuff from the kernel, mixing them is problematic
 
What do you guys recommend for the flavor of linux inside the qemu vm which will host docker and its containers? is it just down to personal preference or are there specific distros that are better suited for it, or are we just looking for lean and mean (like Alpine?)
 
What do you guys recommend for the flavor of linux inside the qemu vm which will host docker and its containers? is it just down to personal preference or are there specific distros that are better suited for it, or are we just looking for lean and mean (like Alpine?)
Whatever you are familiar with and is supported by Docker, Podman or any other CRI.

Personally, I use Alpine and Debian.
 
Last edited:
  • Like
Reactions: Johannes S