Skip to content

Commit

Permalink
#7944: Add docker convenience installation script for devs
Browse files Browse the repository at this point in the history
  • Loading branch information
ttmchiou authored and TT-billteng committed May 16, 2024
1 parent 925a14e commit a8482f2
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions scripts/docker/install_docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/bash

# Setup sources for docker
sudo apt-get update -y
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

# Add the repository to Apt sources:
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update -y

# Install docker and plugins
sudo apt-get install -y \
docker-ce=5:26.1.1-1~ubuntu.20.04~focal \
docker-ce-cli=5:26.1.1-1~ubuntu.20.04~focal \
containerd.io=1.6.31-1 \
docker-buildx-plugin=0.14.0-1~ubuntu.20.04~focal \
docker-compose-plugin=2.27.0-1~ubuntu.20.04~focal

# Set up docker for non-root user
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker

0 comments on commit a8482f2

Please sign in to comment.