Skip to content

Instantly share code, notes, and snippets.

@TheTinkerDad
Created January 22, 2022 21:42
Show Gist options
  • Save TheTinkerDad/56d913cb5068f962d0f85b5511631aaf to your computer and use it in GitHub Desktop.
Save TheTinkerDad/56d913cb5068f962d0f85b5511631aaf to your computer and use it in GitHub Desktop.
To install Docker on Debian as root:
1) apt-get update
2) apt-get install ca-certificates curl gnupg lsb-release
3) curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
4) echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
5) apt-get update
6) apt-get install docker-ce docker-ce-cli containerd.io
To enable Docker in an unprivileged LXC container:
1) run: nano /etc/pve/local/lxc/<container id>.conf
2) add "features: keyctl=1,nesting=1" to the file
3) save, exit
3) reboot the container
To test Docker with NetData:
docker run -d --name=netdata -p 19999:19999 -v netdataconfig:/etc/netdata -v netdatalib:/var/lib/netdata -v netdatacache:/var/cache/netdata -v /etc/passwd:/host/etc/passwd:ro -v /etc/group:/host/etc/group:ro -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /etc/os-release:/host/etc/os-release:ro --restart unless-stopped --cap-add SYS_PTRACE --security-opt apparmor=unconfined netdata/netdata
@masterlog80
Copy link

Hello!
Sorry, what is the goal for this?
On ProxMox I have created a standard VM with Ubuntu, installed docker and as per I can see it works fine! :-)
Also, the folder /etc/pve/local/lxc/ is empty on my ProxMox, if I am taking a look at the correct place....
Regards,

@Drauku
Copy link

Drauku commented Jul 2, 2023

Sorry, what is the goal for this?

The goal is to create an LXC container which can run Docker containers. LXC containers share the host kernel, typically use less cpu/ram than virtual machines, and are preferred by some when running docker containers under Proxmox.

Also, the folder /etc/pve/local/lxc/ is empty on my ProxMox

This is simply because you haven't yet created any LXC containers.

@masterlog80
Copy link

Thanks for the clarification!

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