Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heinrich-ulbricht/3985036db8dd34c3dafb46568ef54aab to your computer and use it in GitHub Desktop.
Save heinrich-ulbricht/3985036db8dd34c3dafb46568ef54aab to your computer and use it in GitHub Desktop.
Install Docker In Qubes OS Debian 10 TemplateVM (note the AppVM steps)
#!/bin/bash
#
# -----------------------
#
# This is a script that installs docker-ce (Docker Community Edition) on Debian 10
# Inspired by https://gist.github.com/upbeta01/3b968320b3a579c326ab6cd2a195b10d
#
# -----------------------
# Pre-requesite
sudo apt-get -y remove docker docker-engine docker.io containerd runc
# Docker Setup (repo)
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates wget curl gnupg2 software-properties-common
wget https://download.docker.com/linux/debian/gpg # note: if you don't have networking enabled for your TemplateVM use another VM to download the file and send it over to your TemplateVM via "Copy To Other AppVM..."
sudo apt-key add gpg
echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee -a /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-cache policy docker-ce
# Install Docker
sudo apt-get -y install docker-ce
# Start Docker
sudo systemctl start docker
# Do NOT enable Docker service on boot - we do this in the AppVM and change the Docker directory
# sudo systemctl enable docker
# Create a group "docker"
sudo groupadd docker
# Add user to group "docker"
sudo gpasswd -a $USER docker
# Restart Docker
sudo systemctl restart docker
# Disable - and enable in AppVM
sudo systemctl disable docker
# You may shutdown now and continue in the AppVM
# sudo shutdown now
# Now continue in AppVM:
# - change the Docker folder as described here: https://0x666f6f.bitbucket.io/2018/05/qubesos-automatically-install-and-configure-docker-ce-in-debian/
# - restart the AppVM
# - test docker using "docker run hello-world"
@maietta
Copy link

maietta commented Feb 4, 2022

Thanks!

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