This is not a complete setup nor is it meant to run unattended. Requires the user to have a user and be a sudoer.
sudo echo "`whoami` ALL=(ALL) NOPASSWD:ALL" |sudo tee -a /etc/sudoers
sudo pacman -Syu
sudo pacman -S docker
sudo systemctl start docker.service
sudo systemctl enable docker.service