Skip to content

Instantly share code, notes, and snippets.

@ei-grad
Last active June 9, 2023 10:28
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 ei-grad/a5c50c8d2fb63d26915c5ca56d10869b to your computer and use it in GitHub Desktop.
Save ei-grad/a5c50c8d2fb63d26915c5ca56d10869b to your computer and use it in GitHub Desktop.
Small snippet to install docker in ubuntu
#!/bin/bash
ARCH="$(dpkg --print-architecture)"
CODENAME="$(. /etc/os-release && echo "$VERSION_CODENAME")"
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor > /etc/apt/trusted.gpg.d/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)"] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" \
> /etc/apt/sources.list.d/docker.list
apt update
apt install -y --no-install-recommends docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment