https://docs.docker.com/engine/install/ubuntu/
mkdir -pv $HOME/_setup && cd $HOME/_setup
export ARCH=amd64
cat <<EOF > docker_setup.sh
# Setup Docker
for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done
sudo apt-get update -y
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] 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
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
# sudo docker run hello-world
sudo chown $USER:$USER /var/run/docker.sock
sudo service docker start
# sudo service docker status
# install go
curl -LO https://go.dev/dl/go1.21.0.linux-${ARCH}.tar.gz
sudo rm -rf /usr/local/go && sudo tar -C /usr/local -xzf go1.21.0.linux-${ARCH}.tar.gz
rm go1.21.0.linux-${ARCH}.tar.gz
# install kind
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.20.0/kind-linux-${ARCH}
chmod +x ./kind
sudo mv ./kind /usr/local/bin/kind
# setting PATH & completions
echo 'export PATH="/usr/local/go/bin:\$PATH"' >> $HOME/.zshrc
echo 'kind completion zsh > \$HOME/Repos/zsh-users/zsh-completions/src/_kind' >> $HOME/.zshrc
echo 'docker completion zsh > \$HOME/Repos/zsh-users/zsh-completions/src/_docker' >> $HOME/.zshrc
EOF
chmod +x docker_setup.sh && ./docker_setup.sh && \
autoload -U compinit; compinit && source $HOME/.zshrc
# install oci cli
curl -LO https://raw.githubusercontent.com/oracle/oci-cli/master/scripts/install/install.sh
chmod +x install.sh && ./install.sh --accept-all-defaults