In relation to http://www.solaris-cookbook.eu/linux/debian-proxmox-install-docker-with-rancher-and-dockerui-webgui/

I thought that it actually may make more sense to run Rancher and my Docker inside an LXC container rather than on the initial host itself.

The container provides me still with near to physical host performance but I am able to start and stop on demand and allocate resources for more docker apps as needed without impacting other guests.

A default LXC does not allow docker to run inside. In order to do so, once the container has been created (for example CT100) I had to:

cd /etc/pve/lxc

where I see my lxc container configurations. Stop the container in question, and vi the config file

vi 100.conf

it will look a bit like this where all I did was to add the part after “#insert docker part below”

arch: amd64
cores: 1
hostname: RancherServer
memory: 3088
net0: name=eth0,bridge=vmbr0,gw=xxx.xxx.xx.x,hwaddr=xx:xx:xx:xx:xx:xx,ip=xxx.xxx.xx.xx/24,type=veth
onboot: 0
ostype: ubuntu
rootfs: local-zfs:subvol-100-disk-1,size=30G
swap: 512
#insert docker part below
lxc.aa_profile: unconfined
lxc.cgroup.devices.allow: a
lxc.cap.drop:

Save and then start the container.

You can now login to the container and install docker and or Rancher as per guide here

  • Peter Sandersen

    Thanks for the guide, unfortunately its not working for me. On an ubuntu 14.04 container I get the following:

    sudo docker run –rm hello-world
    FATA[0001] Error response from daemon: Cannot start container f633a6f01535b4776be46690c04bb6a71ebd6ca065ebe56f26ad5d655d177917: [8] System error: mountpoint for cpu not found

    Any advice or other tricks to get it to work? Cheers

    • I’m still looking into this.
      It doesn’t work with a new CT I created but works with my existing CT.

      • Ok it works flawless with Ubuntu 16.04 CT. Something is broken with 14.04 Docker. I suggest you try install Docker from their website.

%d bloggers like this: