Skip to content

Instantly share code, notes, and snippets.

@alexdmoss
Created January 6, 2022 10:51
Show Gist options
  • Save alexdmoss/14fd33bb91beb2283d6a8ed0a8df64a3 to your computer and use it in GitHub Desktop.
Save alexdmoss/14fd33bb91beb2283d6a8ed0a8df64a3 to your computer and use it in GitHub Desktop.
sudo apt-get install -y --no-install-recommends apt-transport-https ca-certificates curl gnupg2 software-properties-common # install dependencies
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - # allows apt to trust the docker repo
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" # adds the repo to apt's list of repositories
sudo apt update && apt install docker-ce docker-ce-cli containerd.io # actually install the docker daemon, containerd and the cli
# we then need to sort out some permissions for your user
sudo groupadd docker
sudo usermod -aG docker $(whoami)
sudo chown root:docker /var/run/docker.sock
sudo chmod 660 /var/run/docker.sock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment