Why Docker on a Linux Container?
Simply put – saving resources. Proxmox official support would always recommend that you run Docker in VMs, but the disadvantage to that is that VMs require more resources from the hypervisor. Running Docker in a Linux Container (LXC) will allow you to run Docker at a fraction of the resource requirements with much faster boot speeds.
Please Note: Any time you want to run Docker on a Linux Container, simply repeat the steps as documented here.
Using ZFS? These steps were tested on a Proxmox node configured with ZFS and no observable issues could be detected.
Preparing Proxmox
Ensure FUSE OverlayFS is Installed on the Hypervisor
apt clean && apt update
apt install -y fuse-overlayfs
Create a Linux Container and Test Functionality
Create the Linux Container









Change a Few Container Options




You may now start the container.
Configure and Test Docker
Install and Configure FUSE OverlayFS on the Linux Container
apt clean && apt update
apt install -y fuse-overlayfs
ln -s /usr/bin/fuse-overlayfs /usr/local/bin/fuse-overlayfs
Install Docker Engine on the Linux Container
Since the image I am using is Debian 11, we can follow the official Docker Engine installation instructions for Debian.
# Ensure pre-requisites are installed
apt install -y ca-certificates curl gnupg lsb-release
# Add Docker GPG key
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
# Add Docker apt repository
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
# Update sources and install Docker Engine
apt update
apt install -y docker-ce docker-ce-cli containerd.io docker-compose docker-compose-plugin
# Test for successful installation
docker run hello-world