#!/bin/bash

# basic updates and installation
apt update
apt install -y awscli
apt install -y apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

# install docker
mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg

echo \
  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
  $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null

apt-get update
apt-get --assume-yes install docker-ce

usermod -aG docker ubuntu  # making it available for non-root user ubuntu

reboot
