You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
741 B
Bash
23 lines
741 B
Bash
#!/bin/bash
|
|
set -euo pipefail
|
|
|
|
########################
|
|
### SCRIPT VARIABLES ###
|
|
########################
|
|
|
|
# Name of the user to create and grant sudo privileges
|
|
USERNAME=yourusername
|
|
|
|
apt update
|
|
apt install apt-transport-https ca-certificates curl software-properties-common
|
|
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
|
|
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
|
|
apt update
|
|
apt-cache policy docker-ce
|
|
apt install docker-ce
|
|
systemctl status docker
|
|
usermod -aG docker ${USERNAME}
|
|
|
|
curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
|
|
chmod +x /usr/local/bin/docker-compose
|