Migration
Migration to PVE from other hypervisors and docker container imports.
Docker Migration
Proxmox can run docker in a LXC container until services are de-dockerized and moved.
Danger
high security risk. Most container security benefits are removed to enable docker to run in an LXC container. Migrate these services ASAP!
Enable container filesystem overlay for docker support.
aufs
overlay
reboot
Create container to host Docker
datacenter › {SERVER} › 🖱 › create ct
General
› Hostname
HOST
› Unprivileged container
☑
› password
PASS
Template
› Storage
LOCAL
› Template
{CONTAINER IMAGE}
Root Disk
› Storage
local-lvm
› Disk size
20GB
CPU
› Cores
64
Memory
› Memory
125000
Memory is in MiB
not MB
. Create but do not start container. Note
the ID of the container.
Updated: None
Remove security constraints on container.
lxc.apparmor.profile: unconfined
lxc.cgroup2.devices.allow: a
lxc.cap.drop:
apt update && apt upgrade
apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
apt-key fingerprint 0EBFCD88
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt update && apt install docker-ce docker-ce-cli containerd.io
Enable overlay filesystem for docker.
{
"storage-driver": "overlay2"
}
service docker restart
Map proxmox ZFS drive to container.
pct set {COTAINER ID} -mp{XX} mp=/host/dir,/container/mount/point
Note
XX
is the numeric mount point, starting at zero. See
/etc/pve/nodes/NODE/lxc/{ID}.conf
for available mount points.
Reboot container for the mountpoint to be added.