Skip to content

Instantly share code, notes, and snippets.

@ras0q
Last active October 5, 2023 13:21
Show Gist options
  • Select an option

  • Save ras0q/b25db9a561724252aa67812a584a69f2 to your computer and use it in GitHub Desktop.

Select an option

Save ras0q/b25db9a561724252aa67812a584a69f2 to your computer and use it in GitHub Desktop.
install docker to ubuntu
bash -c '
sudo apt-get update -y;
sudo apt-get install -y \
ca-certificates \
curl \
gnupg \
lsb-release;
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg;
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null;
sudo apt-get update -y;
sudo apt-get install -y docker-ce docker-ce-cli containerd.io;
mkdir -p ~/.docker/cli-plugins/;
curl -SL https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -o ~/.docker/cli-plugins/docker-compose;
chmod +x ~/.docker/cli-plugins/docker-compose;
echo "all done!!";
'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment