To install docker on ubuntu server 18.04, you can run the following commands:
sudo apt-get updatesudo apt-get -y install apt-transport-https ca-certificates curl gnupg-agent software-properties-commoncurl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -sudo apt-key fingerprint 0EBFCD88sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"sudo apt-get updatesudo apt-cache policy docker-cesudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-composesudo systemctl status dockersudo docker versionsudo apt-get -y install apt-transport-https ca-certificates curl software-properties-commonsudo usermod -aG docker user