Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gopikrishna19/4df94cc3fa7add936f8415a32fab295a to your computer and use it in GitHub Desktop.
Save Gopikrishna19/4df94cc3fa7add936f8415a32fab295a 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment