docker in lxc container

Discussion in 'Proxmox VE: Installation and configuration' started by limone, Jul 7, 2018.

  1. limone

    limone Member

    Joined:
    Aug 1, 2017
    Messages:
    45
    Likes Received:
    0
  2. limone

    limone Member

    Joined:
    Aug 1, 2017
    Messages:
    45
    Likes Received:
    0
  3. atl

    atl New Member

    Joined:
    Dec 2, 2015
    Messages:
    4
    Likes Received:
    1
    It works! you can use aufs or overlay file system. For using it within a LXC container, you have to load the module on the proxmox host. I've inserted it into /etc/modules-load.d/modules.conf :
    Code:
    # /etc/modules: kernel modules to load at boot time.
    #
    # This file contains the names of kernel modules that should be loaded
    # at boot time, one per line. Lines beginning with "#" are ignored.
    aufs
    overlay
    After reboot you can check, if the module was loaded:
    Code:
    root@proxmox:~# lsmod | grep -E 'overlay|aufs'
    overlay                77824  8
    aufs                  237568  0
    Within the LXC container the same command should show, that the modules are loaded. Then change the docker configuration /etc/docker/daemon.json to use the wanted filesystem. I'm using overlay file system within LXC:
    Code:
    root@lxc:~# cat /etc/docker/daemon.json
    {
      "storage-driver": "overlay2"
    }
    
    After restart docker service you can see with docker info, if it works:
    Code:
    root@lxc:~# docker info
    Containers: 18
     Running: 0
     Paused: 0
     Stopped: 18
    Images: 4
    Server Version: 17.05.0-ce
    Storage Driver: overlay2
     Backing Filesystem: extfs
     Supports d_type: true
     Native Overlay Diff: true
    Logging Driver: json-file
    ...
     
  4. LnxBil

    LnxBil Well-Known Member

    Joined:
    Feb 21, 2015
    Messages:
    3,116
    Likes Received:
    259
  5. jester

    jester New Member
    Proxmox VE Subscriber

    Joined:
    Aug 17, 2014
    Messages:
    20
    Likes Received:
    0
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice