Skip to content

Instantly share code, notes, and snippets.

@darth-veitcher
Created December 2, 2017 21:05
Show Gist options
  • Save darth-veitcher/3b1a9ec22468776fc58528cb0a4f9220 to your computer and use it in GitHub Desktop.
Save darth-veitcher/3b1a9ec22468776fc58528cb0a4f9220 to your computer and use it in GitHub Desktop.
running docker inside lxc container on proxmox

Docker install notes

Source: Docker install

Proxmox: Need to add lxc.aa_profile = unconfined, security.privileged = true and lxc.cap.drop = into the container config in /etc/pve/lxc/ per forums and here.

sudo apt-get update

The below will fail if running on ProxMox due to specific kernel

sudo apt-get install -y \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

Install the packages to allow repository

sudo apt-get install -y \
    apt-transport-https \
    ca-certificates \
    curl \
    software-properties-common

Add the GPG key

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

Set up the repository

# For amd64
sudo add-apt-repository \
    "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) \
    stable"

Add the packages

sudo apt-get update
sudo apt-get install -y docker-ce

Test install success

sudo docker run hello-world
@darth-veitcher
Copy link
Author

Main thing to note is the amendments you need to make to the lxc <id>.conf config file in the first paragraph above otherwise Docker won't run and you'll get apparmor errors etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment